styleAdjust
This commit is contained in:
parent
e2493b0eee
commit
ffb7b6ece2
|
@ -13,3 +13,10 @@ export function clockRecord(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getEmployee(data) {
|
||||||
|
return request({
|
||||||
|
url: '/hrm/employee/',
|
||||||
|
method: 'get',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -98,6 +98,7 @@
|
||||||
import center from './center'
|
import center from './center'
|
||||||
import bottomLeft from './bottomLeft'
|
import bottomLeft from './bottomLeft'
|
||||||
import bottomRight from './bottomRight'
|
import bottomRight from './bottomRight'
|
||||||
|
import { getPlanGantt } from "@/api/srm";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ drawMixin ],
|
mixins: [ drawMixin ],
|
||||||
|
@ -108,6 +109,7 @@
|
||||||
dateDay: null,
|
dateDay: null,
|
||||||
dateYear: null,
|
dateYear: null,
|
||||||
dateWeek: null,
|
dateWeek: null,
|
||||||
|
planGanttList:[],
|
||||||
weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
|
weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -122,6 +124,7 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
this.timeFn();
|
this.timeFn();
|
||||||
this.cancelLoading();
|
this.cancelLoading();
|
||||||
|
this.getPageData();
|
||||||
let bigHeight = document.getElementsByClassName('host-body')[0].clientHeight;
|
let bigHeight = document.getElementsByClassName('host-body')[0].clientHeight;
|
||||||
let firstHeight = document.getElementById('firstLine').clientHeight;
|
let firstHeight = document.getElementById('firstLine').clientHeight;
|
||||||
let secondHeight = document.getElementsByClassName('jc-between')[0].clientHeight;
|
let secondHeight = document.getElementsByClassName('jc-between')[0].clientHeight;
|
||||||
|
@ -139,6 +142,16 @@
|
||||||
this.dateWeek = this.weekday[new Date().getDay()]
|
this.dateWeek = this.weekday[new Date().getDay()]
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
|
getPageData(){
|
||||||
|
let that = this;
|
||||||
|
getPlanGantt({Authorization:'big_screen'}).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.planGanttList = res.data.results;
|
||||||
|
} else {
|
||||||
|
that.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
cancelLoading() {
|
cancelLoading() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
|
@ -240,7 +240,8 @@
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="部门" prop="dept_name">
|
<el-table-column label="部门" prop="dept_">
|
||||||
|
<template slot-scope="scope">{{scope.row.dept_.name}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -338,7 +339,8 @@
|
||||||
<script>
|
<script>
|
||||||
import echarts from 'echarts'
|
import echarts from 'echarts'
|
||||||
import {mapGetters} from 'vuex';
|
import {mapGetters} from 'vuex';
|
||||||
import {getUserList} from "@/api/user";
|
// import {getUserList} from "@/api/user";
|
||||||
|
import {getEmployee} from "@/api/hrm";
|
||||||
import {getMaterialList} from "@/api/mtm";
|
import {getMaterialList} from "@/api/mtm";
|
||||||
import {getProductionplanList} from "@/api/pm";
|
import {getProductionplanList} from "@/api/pm";
|
||||||
import {getmaterialbatchList} from "@/api/inm";
|
import {getmaterialbatchList} from "@/api/inm";
|
||||||
|
@ -586,7 +588,7 @@
|
||||||
let that = this;
|
let that = this;
|
||||||
that.listLoadingUser = true;
|
that.listLoadingUser = true;
|
||||||
that.userPage =1;
|
that.userPage =1;
|
||||||
getUserList({page: that.userPage, page_size: that.userPageSize, fields: 'id,name,dept_name,is_atwork'}).then((response) => {
|
getEmployee({page: that.userPage, page_size: that.userPageSize}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
that.userList = response.data.results;
|
that.userList = response.data.results;
|
||||||
that.userTotal = response.data.count;
|
that.userTotal = response.data.count;
|
||||||
|
@ -600,7 +602,7 @@
|
||||||
let that = this;
|
let that = this;
|
||||||
that.listLoadingUser = true;
|
that.listLoadingUser = true;
|
||||||
that.userPage = val;
|
that.userPage = val;
|
||||||
getUserList({page: val, page_size: that.userPageSize, fields: 'id,name,dept_name,is_atwork'}).then((response) => {
|
getEmployee({page: val, page_size: that.userPageSize, fields: 'id,name,dept_name,is_atwork'}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
that.userList = response.data.results;
|
that.userList = response.data.results;
|
||||||
that.userTotal = response.data.count;
|
that.userTotal = response.data.count;
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
|
<div style="margin-top: 2px">
|
||||||
<div style="margin-top: 2px">
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
新增工序
|
||||||
>新增工序</el-button
|
</el-button>
|
||||||
>
|
</div>
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
@ -15,29 +14,29 @@
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
max-height="620"
|
max-height="620"
|
||||||
height="100"
|
height="100"
|
||||||
v-el-height-adaptive-table="{bottomOffset: 10}"
|
v-el-height-adaptive-table="{bottomOffset: 10}"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50"/>
|
||||||
<el-table-column label="工序编号">
|
<el-table-column label="工序编号">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="工序名称">
|
<el-table-column label="工序名称">
|
||||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="工序类别">
|
<el-table-column label="工序类别">
|
||||||
<template slot-scope="scope">{{ type_[scope.row.type] }}</template>
|
<template slot-scope="scope">{{ type_[scope.row.type] }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="生产车间" >
|
<el-table-column label="生产车间">
|
||||||
<template slot-scope="scope" v-if="scope.row.workshop_">{{ scope.row.workshop_.name }}</template>
|
<template slot-scope="scope" v-if="scope.row.workshop_">{{ scope.row.workshop_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="指导书">
|
<el-table-column align="center" label="指导书" show-overflow-tooltip min-width="110">
|
||||||
<template slot-scope="scope" v-if="scope.row.instruction_">
|
<template slot-scope="scope" v-if="scope.row.instruction_">
|
||||||
<el-link :href="scope.row.instruction_.path" >{{scope.row.instruction_.name}}</el-link>
|
<el-link :href="scope.row.instruction_.path">{{scope.row.instruction_.name}}</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间">
|
<el-table-column label="创建时间">
|
||||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -46,25 +45,26 @@
|
||||||
width="220px"
|
width="220px"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
|
||||||
<el-link
|
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleAdd(scope)"
|
@click="handleAdd(scope)"
|
||||||
>添加子工序</el-link
|
|
||||||
>
|
>
|
||||||
|
添加子工序
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['process_update'])"
|
v-if="checkPermission(['process_update'])"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleEdit(scope)"
|
@click="handleEdit(scope)"
|
||||||
>编辑</el-link
|
|
||||||
>
|
>
|
||||||
|
编辑
|
||||||
|
</el-link>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['process_delete'])"
|
v-if="checkPermission(['process_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDelete(scope)"
|
@click="handleDelete(scope)"
|
||||||
>删除</el-link
|
|
||||||
>
|
>
|
||||||
|
删除
|
||||||
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
:title="dialogType === 'edit' ? '编辑工序' : '新增工序'"
|
:title="dialogType === 'edit' ? '编辑工序' : '新增工序'"
|
||||||
>
|
>
|
||||||
|
@ -89,43 +89,42 @@
|
||||||
:rules="rule1"
|
:rules="rule1"
|
||||||
>
|
>
|
||||||
<el-form-item label="工序名称" prop="name">
|
<el-form-item label="工序名称" prop="name">
|
||||||
<el-input v-model="process.name" placeholder="工序名称" />
|
<el-input v-model="process.name" placeholder="工序名称"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工序编号" prop="number">
|
<el-form-item label="工序编号" prop="number">
|
||||||
<el-input v-model="process.number" placeholder="工序编号" />
|
<el-input v-model="process.number" placeholder="工序编号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工序编号" prop="type">
|
<el-form-item label="工序编号" prop="type">
|
||||||
<el-select style="width: 100%" v-model="process.type" placeholder="请选择" >
|
<el-select style="width: 100%" v-model="process.type" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in option"
|
v-for="item in option"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="生产车间" prop="workshop">
|
<el-form-item label="生产车间" prop="workshop">
|
||||||
<treeselect v-model="process.workshop" :options="workoptions" placeholder="所属部门"/>
|
<treeselect v-model="process.workshop" :options="workoptions" placeholder="所属部门"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="指导书内容" prop="instruction_content">
|
<el-form-item label="指导书内容" prop="instruction_content">
|
||||||
<el-input type="textarea" :rows="3" v-model="process.instruction_content" placeholder="指导书内容" />
|
<el-input type="textarea" :rows="3" v-model="process.instruction_content" placeholder="指导书内容"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="指导书" prop="template" v-if="dialogVisible">
|
<el-form-item label="指导书" prop="template" v-if="dialogVisible">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:action="upUrl"
|
:action="upUrl"
|
||||||
:on-preview="handlePreview"
|
:on-preview="handlePreview"
|
||||||
:on-success="handleUpSuccess"
|
:on-success="handleUpSuccess"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:headers="upHeaders"
|
:headers="upHeaders"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||||
|
@ -135,42 +134,42 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getProcessList, createProcess,updateProcess,deleteProcess } from "@/api/mtm";
|
import {getProcessList, createProcess, updateProcess, deleteProcess} from "@/api/mtm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import { getOrgAll } from "@/api/org"
|
import {getOrgAll} from "@/api/org"
|
||||||
import { upUrl, upHeaders } from "@/api/file";
|
import {upUrl, upHeaders} from "@/api/file";
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
|
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import { genTree } from "@/utils";
|
import {genTree} from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaultprocess = {
|
const defaultprocess = {
|
||||||
name: "",
|
name: "",
|
||||||
number: "",
|
number: "",
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination,Treeselect },
|
components: {Pagination, Treeselect},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
process: defaultprocess,
|
process: defaultprocess,
|
||||||
processList: {
|
processList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
upHeaders: upHeaders(),
|
upHeaders: upHeaders(),
|
||||||
upUrl: upUrl(),
|
upUrl: upUrl(),
|
||||||
fileList:[],
|
fileList: [],
|
||||||
workoptions:[],
|
workoptions: [],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
type_:{
|
type_: {
|
||||||
10:'特殊',
|
10: '特殊',
|
||||||
20:'关键',
|
20: '关键',
|
||||||
30:'普通',
|
30: '普通',
|
||||||
|
|
||||||
},
|
},
|
||||||
option: [{
|
option: [{
|
||||||
value: 10,
|
value: 10,
|
||||||
label: '特殊'
|
label: '特殊'
|
||||||
}, {
|
}, {
|
||||||
|
@ -180,144 +179,140 @@ export default {
|
||||||
value: 30,
|
value: 30,
|
||||||
label: '普通'
|
label: '普通'
|
||||||
}],
|
}],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
rule1: {
|
rule1: {
|
||||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
number: [{ required: true, message: "请输入", trigger: "blur" }],
|
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {},
|
|
||||||
watch: {},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
this.getOrgAll();
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
checkPermission,
|
|
||||||
//工序列表
|
|
||||||
getList() {
|
|
||||||
this.listLoading = true;
|
|
||||||
getProcessList(this.listQuery).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
this.processList = response.data;
|
|
||||||
}
|
|
||||||
this.listLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//生产车间
|
|
||||||
getOrgAll() {
|
|
||||||
this.treeLoding = true;
|
|
||||||
getOrgAll().then(response => {
|
|
||||||
this.workoptions = genTree(response.data);
|
|
||||||
this.treeLoding = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handlePreview(file) {
|
|
||||||
if ("url" in file) {
|
|
||||||
window.open(file.url);
|
|
||||||
} else {
|
|
||||||
window.open(file.response.data.path);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleUpSuccess(res, file, filelist) {
|
|
||||||
this.process.instruction = res.data.id;
|
|
||||||
},
|
|
||||||
handleRemove(file, filelist){
|
|
||||||
this.process.instruction = null;
|
|
||||||
},
|
|
||||||
//添加子工序
|
|
||||||
handleAdd(scope)
|
|
||||||
{
|
|
||||||
this.$router.push({name: "Step", params: { id: scope.row.id }, })
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
handleFilter() {
|
};
|
||||||
this.listQuery.page = 1;
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getOrgAll();
|
||||||
},
|
},
|
||||||
resetFilter() {
|
methods: {
|
||||||
this.listQuery = {
|
checkPermission,
|
||||||
page: 1,
|
//工序列表
|
||||||
page_size: 20,
|
getList() {
|
||||||
}
|
this.listLoading = true;
|
||||||
this.getList();
|
getProcessList(this.listQuery).then((response) => {
|
||||||
},
|
if (response.data) {
|
||||||
handleCreate() {
|
this.processList = response.data;
|
||||||
this.process = Object.assign({}, defaultprocess);
|
|
||||||
this.dialogType = "new";
|
|
||||||
this.dialogVisible = true;
|
|
||||||
this.fileList=[];
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs["Form"].clearValidate();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
handleEdit(scope) {
|
|
||||||
this.process = Object.assign({}, scope.row); // copy obj
|
|
||||||
this.dialogType = "edit";
|
|
||||||
this.dialogVisible = true;
|
|
||||||
if (this.process.instruction) {
|
|
||||||
this.fileList = [
|
|
||||||
{
|
|
||||||
name:this.process.instruction_.name,
|
|
||||||
url: this.process.instruction_.path,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs["Form"].clearValidate();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleDelete(scope) {
|
|
||||||
this.$confirm("确认删除?", "警告", {
|
|
||||||
confirmButtonText: "确认",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
type: "error",
|
|
||||||
})
|
|
||||||
.then(async () => {
|
|
||||||
await deleteProcess(scope.row.id);
|
|
||||||
this.getList();
|
|
||||||
this.$message.success("成功");
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
async confirm(form) {
|
|
||||||
this.$refs[form].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
const isEdit = this.dialogType === "edit";
|
|
||||||
|
|
||||||
if (isEdit) {
|
|
||||||
updateProcess(this.process.id, this.process).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
this.getList();
|
|
||||||
this.dialogVisible = false;
|
|
||||||
this.$message.success("成功");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
createProcess(this.process).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
this.getList();
|
|
||||||
this.dialogVisible = false;
|
|
||||||
this.$message.success("成功");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//生产车间
|
||||||
|
getOrgAll() {
|
||||||
|
this.treeLoding = true;
|
||||||
|
getOrgAll().then(response => {
|
||||||
|
this.workoptions = genTree(response.data);
|
||||||
|
this.treeLoding = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handlePreview(file) {
|
||||||
|
if ("url" in file) {
|
||||||
|
window.open(file.url);
|
||||||
} else {
|
} else {
|
||||||
return false;
|
window.open(file.response.data.path);
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
handleUpSuccess(res, file, filelist) {
|
||||||
|
this.process.instruction = res.data.id;
|
||||||
|
},
|
||||||
|
handleRemove(file, filelist) {
|
||||||
|
this.process.instruction = null;
|
||||||
|
},
|
||||||
|
//添加子工序
|
||||||
|
handleAdd(scope) {
|
||||||
|
this.$router.push({name: "Step", params: {id: scope.row.id},})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFilter() {
|
||||||
|
this.listQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
resetFilter() {
|
||||||
|
this.listQuery = {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleCreate() {
|
||||||
|
this.process = Object.assign({}, defaultprocess);
|
||||||
|
this.dialogType = "new";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.fileList = [];
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEdit(scope) {
|
||||||
|
this.process = Object.assign({}, scope.row); // copy obj
|
||||||
|
this.dialogType = "edit";
|
||||||
|
this.dialogVisible = true;
|
||||||
|
if (this.process.instruction) {
|
||||||
|
this.fileList = [
|
||||||
|
{
|
||||||
|
name: this.process.instruction_.name,
|
||||||
|
url: this.process.instruction_.path,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete(scope) {
|
||||||
|
this.$confirm("确认删除?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
await deleteProcess(scope.row.id);
|
||||||
|
this.getList();
|
||||||
|
this.$message.success("成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async confirm(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const isEdit = this.dialogType === "edit";
|
||||||
|
|
||||||
|
if (isEdit) {
|
||||||
|
updateProcess(this.process.id, this.process).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
createProcess(this.process).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.dialogVisible = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -114,60 +114,50 @@
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
height="250"
|
height="250"
|
||||||
|
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"/>
|
<el-table-column type="index" width="50"/>
|
||||||
|
|
||||||
<el-table-column label="订单编号" width="110">
|
<el-table-column label="订单编号" width="110">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客户名称" width="110">
|
<el-table-column label="客户名称" show-overflow-tooltip min-width="110">
|
||||||
<template slot-scope="scope" show-overflow-tooltip>{{ scope.row.customer_.name }}</template>
|
<template slot-scope="scope" show-overflow-tooltip>{{ scope.row.customer_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="合同编号" show-overflow-tooltip min-width="110">
|
||||||
<el-table-column label="合同编号" width="110">
|
|
||||||
<template slot-scope="scope" v-if="scope.row.contract">{{ scope.row.contract_.number }}</template>
|
<template slot-scope="scope" v-if="scope.row.contract">{{ scope.row.contract_.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合同名称" show-overflow-tooltip width="110">
|
<el-table-column label="合同名称" show-overflow-tooltip min-width="110">
|
||||||
<template slot-scope="scope" v-if="scope.row.contract">{{ scope.row.contract_.name }}</template>
|
<template slot-scope="scope" v-if="scope.row.contract">{{ scope.row.contract_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所需产品" show-overflow-tooltip width="150">
|
<el-table-column label="所需产品" show-overflow-tooltip min-width="150">
|
||||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品型号" width="110">
|
<el-table-column label="产品型号" width="110">
|
||||||
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
|
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品数量" width="110">
|
<el-table-column label="产品数量">
|
||||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="已派数量" width="110">
|
<el-table-column label="已派数量">
|
||||||
<template slot-scope="scope">{{ scope.row.planed_count }}</template>
|
<template slot-scope="scope">{{ scope.row.planed_count }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="交货日期" width="100">
|
||||||
<el-table-column label="交货日期" width="110">
|
|
||||||
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="创建时间" show-overflow-tooltip min-width="110">
|
||||||
|
|
||||||
<el-table-column label="创建时间">
|
|
||||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="操作"
|
label="操作"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
width="100px"
|
width="80px"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
<el-link type="primary"
|
<el-link type="primary"
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
@click="handleclick(scope)"
|
@click="handleclick(scope)"
|
||||||
>排产
|
>排产
|
||||||
</el-link
|
</el-link>
|
||||||
>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
<Echart
|
<Echart
|
||||||
:options="pieOptions"
|
:options="pieOptions"
|
||||||
id="pieChart"
|
id="pieChart"
|
||||||
height="400px"
|
height="45vh"
|
||||||
></Echart>
|
></Echart>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="chartsTitle">废料原因统计</div>
|
<div class="chartsTitle">废料原因统计</div>
|
||||||
<div id="barChart" style="width:100%;height: 400px;"></div>
|
<div id="barChart" style="width:100%;height: 45vh"></div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
:id="chartId1"
|
:id="chartId1"
|
||||||
:options="barOptions"
|
:options="barOptions"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="400px"
|
height="45vh"
|
||||||
width="600px"
|
width="600px"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
:id="chartId2"
|
:id="chartId2"
|
||||||
:options="barOptions"
|
:options="barOptions"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="400px"
|
height="45vh"
|
||||||
width="600px"
|
width="600px"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
:id="chartId3"
|
:id="chartId3"
|
||||||
:options="barOptions"
|
:options="barOptions"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="400px"
|
height="45vh"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<Echart
|
<Echart
|
||||||
:options="pieOptions"
|
:options="pieOptions"
|
||||||
id="pieChart"
|
id="pieChart"
|
||||||
height="400px"
|
height="45vh"
|
||||||
></Echart>
|
></Echart>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
:id="chartId1"
|
:id="chartId1"
|
||||||
:options="barOptions"
|
:options="barOptions"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="400px"
|
height="45vh"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
:id="chartId2"
|
:id="chartId2"
|
||||||
:options="barOptions1"
|
:options="barOptions1"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="400px"
|
height="45vh"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
|
@ -55,10 +55,10 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
<el-table-column label="订单编号" width="160" show-overflow-tooltip>
|
<el-table-column label="订单编号" width="120" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品名称" width="200" show-overflow-tooltip>
|
<el-table-column label="产品名称" width="160" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品数量">
|
<el-table-column label="产品数量">
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue