worktask
This commit is contained in:
parent
ce1e98df96
commit
e5f3d24205
|
@ -2,9 +2,9 @@
|
|||
NODE_ENV = production
|
||||
|
||||
# 标题
|
||||
VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||
# VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||
# VUE_APP_TITLE = '托克逊能源管理平台'
|
||||
# VUE_APP_TITLE = '中建材光子科技有限公司'
|
||||
VUE_APP_TITLE = '中建材光子科技有限公司'
|
||||
|
||||
|
||||
# 接口地址
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
|
@ -32,7 +32,8 @@
|
|||
<div id="app" class="aminui">
|
||||
<div class="app-loading">
|
||||
<div class="app-loading__logo">
|
||||
<img src="img/bbmg.jpg"/>
|
||||
<!-- <img src="img/bbmg.jpg"/> -->
|
||||
<img src="img/gz_logo.png"/>
|
||||
</div>
|
||||
<div class="app-loading__loader"></div>
|
||||
<div class="app-loading__title"><%= VUE_APP_TITLE %></div>
|
||||
|
|
|
@ -60,6 +60,14 @@ export default {
|
|||
);
|
||||
}
|
||||
},
|
||||
related: {
|
||||
name: "获取已下达的所有的兄弟小任务",
|
||||
req: async function(id){
|
||||
return await http.get(
|
||||
`${config.API_URL}/pm/mtask/${id}/related/`
|
||||
);
|
||||
}
|
||||
},
|
||||
submitSameDay:{
|
||||
name: "提交同一天的该部门下的所有兄弟小任务",
|
||||
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: {
|
||||
list: {
|
||||
name: "生产任务列表",
|
||||
|
|
|
@ -190,13 +190,23 @@ export default {
|
|||
},
|
||||
//车间库存
|
||||
wmaterial: {
|
||||
name: "车间库存",
|
||||
req: async function(data){
|
||||
return await http.get(
|
||||
`${config.API_URL}/wpm/wmaterial/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
list: {
|
||||
name: "车间库存",
|
||||
req: async function(data){
|
||||
return await http.get(
|
||||
`${config.API_URL}/wpm/wmaterial/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
batchs: {
|
||||
name: "获取车间出现过的批次号",
|
||||
req: async function(data){
|
||||
return await http.post(
|
||||
`${config.API_URL}/wpm/wmaterial/batchs/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
},
|
||||
// //值班停机关系
|
||||
// stsflog: {
|
||||
|
|
|
@ -333,10 +333,19 @@ export default {
|
|||
// },
|
||||
rowClick(row, column, event){
|
||||
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.$emit("submit", this.choseData);
|
||||
this.dialoguser=false
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection) {
|
||||
|
|
|
@ -143,7 +143,7 @@ export default {
|
|||
order: null,
|
||||
loading: false,
|
||||
tableHeight: "100%",
|
||||
tableParams: Object.assign({}, this.params),
|
||||
tableParams: this.params,
|
||||
userColumn: [],
|
||||
customColumnShow: false,
|
||||
summary: {},
|
||||
|
|
|
@ -794,7 +794,8 @@ const routes = [
|
|||
"meta": {
|
||||
"title": "生产一部记录",
|
||||
"icon": "el-icon-cellphone",
|
||||
"perms": ["wpm"]
|
||||
"perms": ["wpm"],
|
||||
"hidden":true
|
||||
},
|
||||
"component": "wpm/worktaskFlog"
|
||||
},
|
||||
|
@ -1765,7 +1766,7 @@ const routes = [
|
|||
"meta": {
|
||||
"title": "菜单管理",
|
||||
"icon": "el-icon-fold",
|
||||
"perms": ["menu"]
|
||||
"perms": ["menu"]
|
||||
},
|
||||
"component": "ops/menu"
|
||||
},
|
||||
|
@ -1815,7 +1816,7 @@ const routes = [
|
|||
"meta": {
|
||||
"title": "配置",
|
||||
"icon": "el-icon-document",
|
||||
"perms": ["ops"]
|
||||
"perms": ["sysconfig"]
|
||||
},
|
||||
"component": "ops/setting"
|
||||
},
|
||||
|
@ -1847,12 +1848,36 @@ const routes = [
|
|||
},
|
||||
"component": "bigScreen/index_enm"
|
||||
},
|
||||
//光子大屏
|
||||
//光子——数据看板
|
||||
{
|
||||
"path": "/bigScreenP",
|
||||
"name": "bigScreenP",
|
||||
"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",
|
||||
"perms": ["bigScreenP"],
|
||||
"fullpage": true,
|
||||
|
|
|
@ -205,7 +205,7 @@
|
|||
import setting from './components/setting.vue';
|
||||
import iframeView from './components/iframeView.vue';
|
||||
import autoExit from './other/autoExit.js';
|
||||
|
||||
import data from './../utils/baseJson';
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
|
@ -229,12 +229,15 @@
|
|||
},
|
||||
computed:{
|
||||
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;
|
||||
},
|
||||
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
|
||||
},
|
||||
ismobile(){
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"base_name": "托克逊能化绿色建材厂能源管理平台",
|
||||
"base_logo": "/media/default/logo.png",
|
||||
"base_name_short": "托克逊能管",
|
||||
"base_logo_side": "/media/default/logo_side.jpg"
|
||||
"base_logo_side": "/media/default/logo_side.jpg",
|
||||
"name":"enm"
|
||||
},
|
||||
"apk": {
|
||||
"apk_version": "1.01.44",
|
||||
|
@ -17,8 +18,10 @@
|
|||
"base": {
|
||||
"base_name": "中建材光子科技有限公司",
|
||||
"base_logo": "/media/default/gz_logo.png",
|
||||
"base_login_img":"/media/default/gz_login_img.png",
|
||||
"base_name_short": "光子科技",
|
||||
"base_logo_side": "/media/default/logo_side.jpg"
|
||||
"base_logo_side": "/media/default/logo_side.jpg",
|
||||
"name":"photon"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -259,7 +259,7 @@ export default {
|
|||
const createScene = function () {
|
||||
const scene = new BABYLON.Scene(engine);
|
||||
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);
|
||||
groundMaterial.majorUnitFrequency = 5;
|
||||
groundMaterial.minorUnitVisibility = 0.5;
|
||||
|
@ -272,19 +272,19 @@ export default {
|
|||
const largeGroundMat = new BABYLON.StandardMaterial("largeGroundMat");
|
||||
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});
|
||||
largeGround.material = groundMaterial;
|
||||
largeGround.position.y = -0.1;
|
||||
// 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.position.y = -0.1;
|
||||
|
||||
|
||||
// 加载背景图片
|
||||
// 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();
|
||||
camera.lowerBetaLimit = Math.PI / 2.6; //无法移动到地面以下
|
||||
camera.upperBetaLimit = Math.PI / 2.1; //无法移动到地面以下
|
||||
// camera.lowerBetaLimit = Math.PI / 2.6; //无法移动到地面以下
|
||||
camera.upperBetaLimit = Math.PI / 2.6; //无法移动到地面以下
|
||||
camera.attachControl(canvas, true);
|
||||
camera.maxZ = 200; // 调整适当的值
|
||||
camera.maxZ = 100; // 调整适当的值
|
||||
// 相机限制
|
||||
camera.lowerRadiusLimit = 2;
|
||||
camera.upperRadiusLimit = 4;
|
||||
|
@ -340,7 +340,7 @@ export default {
|
|||
mesh_name.color = 'white';
|
||||
mesh_name.fontSize = '14px';
|
||||
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) {
|
||||
engine.hideLoadingUI()
|
||||
},
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<el-link
|
||||
type="primary"
|
||||
@click="table_edit(scope.row)"
|
||||
v-auth="'equipment.update'"
|
||||
v-auth="'equipment'"
|
||||
>
|
||||
编辑
|
||||
</el-link>
|
||||
|
@ -81,7 +81,7 @@
|
|||
<el-link
|
||||
type="danger"
|
||||
@click="table_del(scope.row)"
|
||||
v-auth="'equipment.delete'"
|
||||
v-auth="'equipment'"
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
|
|
|
@ -74,13 +74,13 @@
|
|||
<el-table-column label="备注" show-overflow-tooltip>
|
||||
<template #default="scope">{{ scope.row.description }}</template>
|
||||
</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">
|
||||
<el-link
|
||||
type="primary"
|
||||
v-if="scope.row.cycle!==null"
|
||||
@click="table_record (scope.row)"
|
||||
v-auth="'equipment.update'"
|
||||
v-auth="'equipment'"
|
||||
>
|
||||
检定记录
|
||||
</el-link>
|
||||
|
@ -88,7 +88,7 @@
|
|||
<el-link
|
||||
type="primary"
|
||||
@click="table_edit(scope.row)"
|
||||
v-auth="'equipment.update'"
|
||||
v-auth="'equipment'"
|
||||
>
|
||||
编辑
|
||||
</el-link>
|
||||
|
@ -96,7 +96,7 @@
|
|||
<el-link
|
||||
type="danger"
|
||||
@click="table_del(scope.row)"
|
||||
v-auth="'equipment.delete'"
|
||||
v-auth="'equipment'"
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<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 class="retangleWrap">
|
||||
|
|
|
@ -166,33 +166,41 @@ export default {
|
|||
var res1 = await that.$API.auth.info.get();
|
||||
that.$TOOL.data.set("USER_INFO", res1);
|
||||
that.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms));
|
||||
debugger;
|
||||
console.log(this.$TOOL.data.get('BASE_INFO').base.base_name)
|
||||
if(this.$TOOL.data.get('BASE_INFO').base.base_name_short=='托克逊能管'){//托克逊
|
||||
let homePath = this.$TOOL.data.get('BASE_INFO').base.name;
|
||||
if(homePath=='enm'){
|
||||
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;
|
||||
}
|
||||
})
|
||||
}else if(homePath=='photon'){
|
||||
this.$router.replace({
|
||||
path: "/dashboard_photon",
|
||||
});
|
||||
}
|
||||
// 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) {
|
||||
that.islogin = false;
|
||||
console.log(err);}
|
||||
|
|
|
@ -17,7 +17,10 @@
|
|||
</div>
|
||||
<div class="login-form">
|
||||
<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">
|
||||
<label>{{baseConfig.base_name}}</label>
|
||||
</div>
|
||||
|
@ -254,4 +257,7 @@
|
|||
height: 500px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
#photonImg{
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<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">
|
||||
<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>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<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="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
|
@ -16,10 +16,10 @@
|
|||
<template #default="scope"><span>{{ mtaskStateOptions[scope.row.state] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工段" prop="mgroup_name">
|
||||
<!-- <template #default="scope"><span>{{ mtaskStateOptions[scope.row.state] }}</span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="工段" prop="mgroup_name">
|
||||
<template #default="scope"><span>{{ mtaskStateOptions[scope.row.state] }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="number">
|
||||
|
@ -54,8 +54,8 @@
|
|||
<el-main class="nopadding" style="position: relative;height: 50%;">
|
||||
<div class="right-panel" v-if="activeNameSub == 'order'"
|
||||
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" icon="el-icon-plus">合并任务</el-button>
|
||||
<el-button type="primary" @click="startPlan">排产</el-button>
|
||||
<!-- <el-button type="primary" icon="el-icon-plus">合并任务</el-button> -->
|
||||
</div>
|
||||
<el-tabs v-model="activeNameSub" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="订单排产" name="order">
|
||||
|
@ -121,7 +121,7 @@ export default {
|
|||
dialog: {
|
||||
save: false,
|
||||
},
|
||||
apiMtask: this.$API.pm.mtask.list,
|
||||
apiUtask: this.$API.pm.utask.list,
|
||||
apiOrderItem: this.$API.sam.orderitem.list,
|
||||
paramsOrderItem: { utask__isnull: true },
|
||||
paramsMtask: { parent__isnull: true, mgroup__belong_dept__name: '6车间', material_out__is_hidden: true },
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
<div>
|
||||
<el-card style="width: 100%" header="订单明细" shadow="hover">
|
||||
<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>
|
||||
<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 label="所需产品" prop="material" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
|
@ -64,11 +64,8 @@ export default {
|
|||
dialog: {
|
||||
save: false,
|
||||
},
|
||||
apiObj: this.$API.sam.orderitem.list,
|
||||
query: {
|
||||
page: 1,
|
||||
page_size: 20
|
||||
},
|
||||
apiObj: null,
|
||||
params: {},
|
||||
orderId: '',
|
||||
orderObj: {},
|
||||
selection: [],
|
||||
|
@ -82,6 +79,8 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.orderId = this.$route.query.order;
|
||||
this.params.order = this.$route.query.order;
|
||||
this.apiObj = this.$API.sam.orderitem.list;
|
||||
this.getOrder();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
style="width:100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in materialOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in options"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="!scope.row.change">{{ scope.row.processName }}</span>
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -70,17 +70,17 @@
|
|||
</el-select> -->
|
||||
</template>
|
||||
</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">
|
||||
<el-link type="primary" @click="submitRecord(scope.row)" >确定 </el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</sc-form-table>
|
||||
</el-form>
|
||||
<el-footer>
|
||||
<el-button type="primary" @click="submitForm">保存</el-button>
|
||||
<el-button @click="resetForm">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -91,7 +91,6 @@ import { index } from 'd3';
|
|||
emits: ["success", "closed"],
|
||||
props:{
|
||||
mtask: { type: String, default: '' },
|
||||
materialId: { type: String, default: '' },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -125,16 +124,19 @@ import { index } from 'd3';
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getProcess();
|
||||
this.getBatchs();
|
||||
this.getFormList();
|
||||
},
|
||||
methods: {
|
||||
getFormList(){
|
||||
this.$API.mtm.route.list.req({page:0,material:this.materialId}).then((res) => {
|
||||
res.forEach(item=>{
|
||||
this.$API.pm.mtask.related.req(this.mtask).then(res=>{
|
||||
// debugger;
|
||||
console.log('工序进度')
|
||||
console.log(res)
|
||||
res.forEach(item=>{
|
||||
let obj = {
|
||||
process: item.process,
|
||||
processName: item.process_name,
|
||||
process: item.mgroup,
|
||||
processName: item.mgroup_name,
|
||||
count_use:1,
|
||||
count_ok: 1,
|
||||
count_no1: 0,
|
||||
|
@ -148,10 +150,12 @@ import { index } from 'd3';
|
|||
})
|
||||
})
|
||||
},
|
||||
//获取工序列表
|
||||
getProcess(){
|
||||
var res = this.$API.mtm.process.list.req({page:0}).then(res=>{
|
||||
this.options = res;
|
||||
//获取车间物料批次号
|
||||
getBatchs(){
|
||||
let that = this;
|
||||
this.$API.wpm.wmaterial.batchs.req({belong_dept_name:'6车间'}).then(res=>{
|
||||
that.options = res;
|
||||
console.log(res)
|
||||
});
|
||||
},
|
||||
pushRow(){
|
||||
|
|
|
@ -1,269 +1,333 @@
|
|||
<template>
|
||||
<el-container style="flex-direction: column">
|
||||
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="混料工序" name="first">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:height="topHeight"
|
||||
:params="query"
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品型号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品规格" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划日期" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="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"
|
||||
>生产记录
|
||||
</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="table_show(scope.row)"
|
||||
v-else
|
||||
>查看
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="成型7车间" name="second">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:height="topHeight"
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品型号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品规格" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划日期" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="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"
|
||||
>生产记录
|
||||
</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="table_show(scope.row)"
|
||||
v-else
|
||||
>查看
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="成型10车间" name="third">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:height="topHeight"
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品型号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品规格" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划日期" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="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"
|
||||
>生产记录
|
||||
</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="table_show(scope.row)"
|
||||
v-else
|
||||
>查看
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-main>
|
||||
<el-main class="nopadding" style="position: relative;">
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="13" style="border-right: 1px solid #eeeeee;">工序进度
|
||||
<scTable
|
||||
ref="table"
|
||||
row-key="id"
|
||||
stripe
|
||||
:height="bottomHeight"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="日期" prop="number">
|
||||
</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="合格数量" 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>
|
||||
<el-container style="flex-direction: column">
|
||||
<el-main id="topContainer" class="nopadding" style="position: relative;height: 50%;margin-bottom: 10px;">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10" style="border-right: 1px solid #eeeeee;position: relative;">
|
||||
<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-search" @click="handleQuery" >导出</el-button>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="10车间" name="first">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:height="tableHeight"
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="日均量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="start_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" prop="end_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成量" prop="count">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-form label-width="100px" style="border-bottom: 1px solid #eeeeee;padding: 4px 0;">
|
||||
<el-row>
|
||||
<el-col :md="8" :sm="12" :xs="24">
|
||||
<el-form-item class="infoForm" label="产品名称:"></el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="12" :xs="24">
|
||||
<el-form-item class="infoForm" label="产品型号:"></el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="12" :xs="24">
|
||||
<el-form-item class="infoForm" label="计划数量:">
|
||||
<span></span>
|
||||
<el-input></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-top: 10px;">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
||||
<el-button type="primary" @click="sum">合计</el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="flogs"
|
||||
row-key="id"
|
||||
stripe
|
||||
:height="rightHeight"
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="40"/>
|
||||
<el-table-column type="selection" width="40"/>
|
||||
<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>
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="flogs"
|
||||
row-key="id"
|
||||
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
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
:mtask = "mtask"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></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>
|
||||
<script>
|
||||
import {generateExcel} from "@/utils/exportExcel.js";
|
||||
import saveDialog from "./task2flog_form.vue";
|
||||
import GanttComponent from '@/components/GanttComponent.vue';
|
||||
export default {
|
||||
name: "worktask",
|
||||
name: "rparty",
|
||||
components: {
|
||||
GanttComponent,saveDialog
|
||||
},
|
||||
data() {
|
||||
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: {
|
||||
save: false,
|
||||
},
|
||||
apiObj: this.$API.pm.mtask.daylist,
|
||||
sumLog:false,
|
||||
apiObj: this.$API.pm.mtask.list,
|
||||
query: {
|
||||
page:1,
|
||||
page_size:20,
|
||||
belong_dept_name:'6车间',
|
||||
belong_dept_name:'10车间',
|
||||
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',
|
||||
tableData: [],
|
||||
activeNameSub:'order',
|
||||
selection: [],
|
||||
state_: {
|
||||
10: '完好',
|
||||
20: '限用',
|
||||
30: '在修',
|
||||
40: '禁用',
|
||||
},
|
||||
topHeight:null,
|
||||
bottomHeight:null,
|
||||
10: '完好',
|
||||
20: '限用',
|
||||
30: '在修',
|
||||
40: '禁用',
|
||||
},
|
||||
mtask:'',
|
||||
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(){
|
||||
let heights = document.getElementById('topContainer').clientHeight;
|
||||
console.log('heights',heights)
|
||||
this.topHeight = (heights-50)+'px';
|
||||
this.bottomHeight = (heights-40)+'px';
|
||||
this.tableHeight = (heights-50)+'px';
|
||||
let rightHeight = heights-100;
|
||||
this.rightHeight = rightHeight/2+'px'
|
||||
},
|
||||
methods: {
|
||||
handleClick(val){
|
||||
debugger;
|
||||
console.log(val.index);
|
||||
this.tableData = [];
|
||||
if(val==0){
|
||||
this.$API.wpm.mtask.list.req().then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}else if(val==1){
|
||||
//获取甘特图数据
|
||||
getProjectTaskData() {
|
||||
this.ganttLoading= true;
|
||||
this.tasks.data = [];
|
||||
this.$http({
|
||||
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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}else if(val==2){
|
||||
|
||||
}
|
||||
//自定义新增任务
|
||||
addTask(taskId) {
|
||||
var $this = this;
|
||||
this.$nextTick(() => {
|
||||
$this.$refs.taskAdd.init(task, action, parentTask, $this.milestoneOriginalData);
|
||||
});
|
||||
//删除任务:每次调用gantt内置新增事件时,gantt会直接新增任务到甘特图中,而我们需要的是自定义新增任务
|
||||
gantt.deleteTask(taskId);
|
||||
//灯箱事件必须返回布尔值,这里使用了自定义灯箱返回false,即不打开灯箱
|
||||
return false;
|
||||
},
|
||||
//添加
|
||||
add() {
|
||||
|
@ -281,12 +345,9 @@ export default {
|
|||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$router.push({
|
||||
name: "worktaskFlog",
|
||||
query:{mtask:row.id}
|
||||
|
||||
});
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
//删除
|
||||
|
@ -302,7 +363,10 @@ export default {
|
|||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
//合计
|
||||
sum(){
|
||||
this.sumLog = true;
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
|
@ -312,7 +376,9 @@ export default {
|
|||
}
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query)
|
||||
// this.$refs.table.queryData(this.query)
|
||||
debugger;
|
||||
generateExcel(this.columns,this.flogsData,'测试')
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
|
@ -324,4 +390,12 @@ export default {
|
|||
.el-main.nopadding{
|
||||
padding:0 20px 0 20px
|
||||
}
|
||||
.gantt-container {
|
||||
height: 30%;
|
||||
}
|
||||
.ganntClass {
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
|
@ -1,332 +1,184 @@
|
|||
<template>
|
||||
<el-container style="flex-direction: column">
|
||||
<el-main id="topContainer" class="nopadding" style="position: relative;height: 50%;margin-bottom: 10px;">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="10" style="border-right: 1px solid #eeeeee;position: relative;">
|
||||
<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-search" @click="handleQuery" >导出</el-button>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="10车间" name="first">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:height="tableHeight"
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="日均量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="开始时间" prop="start_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" prop="end_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成量" prop="count">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-form label-width="100px" style="border-bottom: 1px solid #eeeeee;padding: 4px 0;">
|
||||
<el-row>
|
||||
<el-col :md="8" :sm="12" :xs="24">
|
||||
<el-form-item class="infoForm" label="产品名称:"></el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="12" :xs="24">
|
||||
<el-form-item class="infoForm" label="产品型号:"></el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="12" :xs="24">
|
||||
<el-form-item class="infoForm" label="计划数量:">
|
||||
<span></span>
|
||||
<el-input></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div style="margin-top: 10px;">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
||||
<el-button type="primary" @click="sum">合计</el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="flogs"
|
||||
row-key="id"
|
||||
stripe
|
||||
:height="rightHeight"
|
||||
:params="query"
|
||||
>
|
||||
<el-table-column type="index" width="40"/>
|
||||
<el-table-column type="selection" width="40"/>
|
||||
<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>
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="flogs"
|
||||
row-key="id"
|
||||
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>
|
||||
<el-container style="flex-direction: column">
|
||||
<el-main id="topContainer" class="nopadding" style="position: relative;margin-bottom: 10px;">
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="粗加工6车间" name="first">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:height="topHeight"
|
||||
:params="query"
|
||||
hidePagination
|
||||
@row-click="rowClick"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="任务编号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品型号" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品规格" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划日期" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="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"
|
||||
>生产记录
|
||||
</el-link>
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="table_show(scope.row)"
|
||||
v-else
|
||||
>查看
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-main>
|
||||
<el-main class="nopadding" style="position: relative;">
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="13" style="border-right: 1px solid #eeeeee;">
|
||||
<div>工序进度</div>
|
||||
<scTable
|
||||
ref="table"
|
||||
row-key="id"
|
||||
stripe
|
||||
:data="processList"
|
||||
:height="bottomHeight"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="日期" prop="start_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="工序" prop="mgroup_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="型号规格" prop="specification">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="number">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" prop="count">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<div>车间物料</div>
|
||||
<scTable
|
||||
ref="table"
|
||||
row-key="id"
|
||||
stripe
|
||||
:data="wMaterial"
|
||||
:height="bottomHeight"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="产品编号" prop="material_">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.material_.number }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="material_">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.material_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号规格" prop="specification">
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="count">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
:mtask = "mtask"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></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>
|
||||
<script>
|
||||
import {generateExcel} from "@/utils/exportExcel.js";
|
||||
import saveDialog from "./task2flog_form.vue";
|
||||
import GanttComponent from '@/components/GanttComponent.vue';
|
||||
export default {
|
||||
name: "rparty",
|
||||
components: {
|
||||
GanttComponent,saveDialog
|
||||
},
|
||||
name: "worktask",
|
||||
data() {
|
||||
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: {
|
||||
save: false,
|
||||
},
|
||||
sumLog:false,
|
||||
apiObj: this.$API.pm.mtask.list,
|
||||
apiObj: this.$API.pm.mtask.daylist,
|
||||
query: {
|
||||
page:1,
|
||||
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',
|
||||
activeNameSub:'order',
|
||||
tableData: [],
|
||||
selection: [],
|
||||
wMaterial:[],//车间物料
|
||||
processList:[],//工序进度
|
||||
state_: {
|
||||
10: '完好',
|
||||
20: '限用',
|
||||
30: '在修',
|
||||
40: '禁用',
|
||||
},
|
||||
mtask:'',
|
||||
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,
|
||||
}
|
||||
]
|
||||
10: '完好',
|
||||
20: '限用',
|
||||
30: '在修',
|
||||
40: '禁用',
|
||||
},
|
||||
topHeight:null,
|
||||
bottomHeight:null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//清空gantt数据
|
||||
gantt.clearAll();
|
||||
},
|
||||
mounted(){
|
||||
let heights = document.getElementById('topContainer').clientHeight;
|
||||
console.log('heights',heights)
|
||||
this.tableHeight = (heights-50)+'px';
|
||||
let rightHeight = heights-100;
|
||||
this.rightHeight = rightHeight/2+'px'
|
||||
this.topHeight = (heights-50)+'px';
|
||||
this.bottomHeight = (heights-40)+'px';
|
||||
this.getWorkSpaceMaterial();
|
||||
},
|
||||
methods: {
|
||||
//获取甘特图数据
|
||||
getProjectTaskData() {
|
||||
this.ganttLoading= true;
|
||||
this.tasks.data = [];
|
||||
this.$http({
|
||||
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);
|
||||
}
|
||||
});
|
||||
//车间物料
|
||||
getWorkSpaceMaterial(){
|
||||
let that = this;
|
||||
this.$API.wpm.wmaterial.list.req({belong_dept_name:'6车间'}).then(res=>{
|
||||
that.wMaterial = res.results;
|
||||
})
|
||||
},
|
||||
handleClick(val){
|
||||
if(val==0){
|
||||
|
||||
}else if(val==1){
|
||||
|
||||
//自定义新增任务
|
||||
addTask(taskId) {
|
||||
var $this = this;
|
||||
this.$nextTick(() => {
|
||||
$this.$refs.taskAdd.init(task, action, parentTask, $this.milestoneOriginalData);
|
||||
});
|
||||
//删除任务:每次调用gantt内置新增事件时,gantt会直接新增任务到甘特图中,而我们需要的是自定义新增任务
|
||||
gantt.deleteTask(taskId);
|
||||
//灯箱事件必须返回布尔值,这里使用了自定义灯箱返回false,即不打开灯箱
|
||||
return false;
|
||||
}
|
||||
},
|
||||
//点击任务
|
||||
rowClick(row){
|
||||
debugger;
|
||||
console.log(row)
|
||||
let that = this;
|
||||
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=>{
|
||||
// debugger;
|
||||
console.log('工序进度')
|
||||
console.log(res)
|
||||
that.processList = res.results;
|
||||
})
|
||||
},
|
||||
//添加
|
||||
add() {
|
||||
|
@ -344,9 +196,12 @@ export default {
|
|||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
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(() => {});
|
||||
},
|
||||
//合计
|
||||
sum(){
|
||||
this.sumLog = true;
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
|
@ -375,9 +227,7 @@ export default {
|
|||
}
|
||||
},
|
||||
handleQuery() {
|
||||
// this.$refs.table.queryData(this.query)
|
||||
debugger;
|
||||
generateExcel(this.columns,this.flogsData,'测试')
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
|
@ -389,12 +239,4 @@ export default {
|
|||
.el-main.nopadding{
|
||||
padding:0 20px 0 20px
|
||||
}
|
||||
.gantt-container {
|
||||
height: 30%;
|
||||
}
|
||||
.ganntClass {
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
|
@ -4,20 +4,21 @@
|
|||
<el-form label-width="100px">
|
||||
<el-row>
|
||||
<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 :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 :xl="4" :lg="6" :md="8" :sm="12" :xs="24">
|
||||
<el-form-item class="infoForm" label="规格:">{{ orderObj.number }}</el-form-item>
|
||||
</el-col>
|
||||
<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 :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-button type="primary" @click="submitForm">提交</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
@ -76,8 +77,7 @@
|
|||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
:mtask="mtask"
|
||||
:materialId="materialId"
|
||||
:mtask="orderObj.id"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
|
@ -114,9 +114,6 @@
|
|||
getTask(){
|
||||
this.$API.pm.mtask.item.req(this.mtask).then((res) => {
|
||||
this.orderObj = res;
|
||||
this.$API.pm.utask.item.req(res.utask).then((res1) => {
|
||||
this.materialId = res1.material;
|
||||
})
|
||||
})
|
||||
},
|
||||
//添加
|
||||
|
|
|
@ -26,7 +26,7 @@ module.exports = defineConfig({
|
|||
},
|
||||
client: {
|
||||
overlay: {
|
||||
runtimeErrors: false,
|
||||
// runtimeErrors: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue