Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
33408d4d03
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1644973249496" class="icon" viewBox="0 0 1061 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3412" xmlns:xlink="http://www.w3.org/1999/xlink" width="33.15625" height="32"><defs><style type="text/css"></style></defs><path d="M939.425185 796.444444H122.500741C57.230222 796.444444 0 745.775407 0 687.824593V108.619852C0 50.669037 57.192296 0 122.500741 0h816.924444C1004.695704 0 1061.925926 50.669037 1061.925926 108.619852v579.204741C1061.925926 745.775407 1004.73363 796.444444 939.425185 796.444444z m-519.888592-137.102222c16.308148 0 40.808296-16.346074 40.808296-40.846222V373.418667c0-24.500148-16.308148-40.846222-40.808296-40.846223-24.538074 0-40.846222 16.346074-40.846223 40.846223v245.077333c0 24.500148 16.308148 40.846222 40.846223 40.846222z m179.693037 0c24.500148 0 40.846222-16.346074 40.846222-40.846222v-122.538667c0-24.500148-16.308148-40.846222-40.846222-40.846222-24.500148 0-40.846222 16.308148-40.846223 40.846222v122.500741c0 24.538074 16.308148 40.884148 40.846223 40.884148z m179.693037 0c24.538074 0 40.846222-16.346074 40.846222-40.846222V577.611852c0-24.500148-16.308148-40.846222-40.846222-40.846222-24.500148 0-40.808296 16.308148-40.808297 40.846222v40.846222c0 24.500148 16.308148 40.846222 40.808297 40.846222z m-539.117037 0c16.308148 0 40.846222-16.346074 40.846222-40.846222V250.88c0-24.500148-16.308148-40.846222-40.846222-40.846222-24.500148 0-40.846222 16.346074-40.846223 40.846222v367.616c0 24.500148 16.308148 40.846222 40.846223 40.846222zM265.481481 872.296296h530.962963a75.851852 75.851852 0 1 1 0 151.703704H265.481481a75.851852 75.851852 0 1 1 0-151.703704z" p-id="3413" fill="#ffffff"></path></svg>
|
After Width: | Height: | Size: 1.8 KiB |
|
@ -55,7 +55,7 @@ export const constantRoutes = [
|
|||
{
|
||||
path: '/index',
|
||||
component: () => import('@/views/bigScreen/index'),
|
||||
meta: { title: '大屏', icon: 'home', affix: true,keepAlive: false }
|
||||
meta: { title: '大屏', icon: 'bigScreen', affix: true,keepAlive: false }
|
||||
},
|
||||
{
|
||||
path: '/changepassword',
|
||||
|
|
|
@ -684,7 +684,8 @@
|
|||
show: false//Y轴刻度线
|
||||
},
|
||||
axisLabel: {
|
||||
color: '#333333'//Y轴文本颜色
|
||||
color: '#333333',//Y轴文本颜色
|
||||
fontSize: 10,//字体大小
|
||||
},
|
||||
splitLine: {
|
||||
show: true, //Y轴分割线
|
||||
|
|
|
@ -357,7 +357,7 @@ export default {
|
|||
handleDetail(scope) {
|
||||
this.$router.push({
|
||||
name: "fifodetail",
|
||||
params: { id: scope.row.id, pu_order: scope.row.pu_order },
|
||||
params: { id: scope.row.id, pu_order: scope.row.pu_order},
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handlecgxCreate"
|
||||
<el-button v-if="this.$route.params.pu_order!=null" type="primary" icon="el-icon-plus" @click="handlecgxCreate"
|
||||
>新增采购项入库</el-button
|
||||
>
|
||||
<el-table
|
||||
|
@ -39,20 +39,20 @@
|
|||
<el-table-column label="入库数量">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否需要复验">
|
||||
<el-table-column label="是否需要复验" v-if="this.$route.params.pu_order!=null">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.need_test == false">否</el-tag>
|
||||
<el-tag v-else>是</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="复验是否合格">
|
||||
<el-table-column label="复验是否合格" v-if="this.$route.params.pu_order!=null">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_testok == false">不合格</el-tag>
|
||||
<el-tag v-else>合格</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="文件">
|
||||
<el-table-column label="文件" v-if="this.$route.params.pu_order!=null">
|
||||
<template slot-scope="scope" v-if="scope.row.files">
|
||||
<div v-for="item in scope.row.files_" v-bind:key="item.id">
|
||||
<el-link :href="item.path" target="_blank" type="primary">{{
|
||||
|
@ -61,7 +61,7 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<el-table-column align="center" label="操作" width="220px" v-if="this.$route.params.pu_order!=null">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
type="primary"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<el-card>
|
||||
<el-row :gutter="2">
|
||||
<!--表格-->
|
||||
<el-col :span="6">
|
||||
<el-col :span="10">
|
||||
<el-card>
|
||||
<div
|
||||
slot="header"
|
||||
|
@ -30,8 +30,12 @@
|
|||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="表名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
<el-table-column label="表名称" prop="name">
|
||||
</el-table-column>
|
||||
<el-table-column label="表类型">
|
||||
<template slot-scope="scope">
|
||||
{{typeOptions_[scope.row.type]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否启用">
|
||||
<template slot-scope="scope">
|
||||
|
@ -75,6 +79,36 @@
|
|||
<el-form-item label="表格名称" prop="name">
|
||||
<el-input v-model="recordform.name" placeholder="表格名称"/>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="引用表单" prop="field_type">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="recordform.number"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in fieldtypeoptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="表格类型" prop="formUsed">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="recordform.type"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="name">
|
||||
<el-switch v-model="recordform.enabled"></el-switch>
|
||||
</el-form-item>
|
||||
|
@ -239,7 +273,7 @@
|
|||
</el-card>
|
||||
</el-col>
|
||||
<!--表格字段-->
|
||||
<el-col :span="18">
|
||||
<el-col :span="14">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 16px; font-weight: 300">记录字段</span>
|
||||
|
@ -406,69 +440,6 @@
|
|||
<el-form-item label="是否需要判定" prop="need_judge">
|
||||
<el-switch v-model="field.need_judge"></el-switch>
|
||||
</el-form-item>
|
||||
<!--
|
||||
<el-form-item
|
||||
label="上限值"
|
||||
v-if="field.need_judge == true"
|
||||
prop="high_limit"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="field.high_limit"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="上限规则"
|
||||
v-if="field.need_judge == true"
|
||||
prop="high_rule"
|
||||
>
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="field.high_rule"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in highoptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="下限值"
|
||||
v-if="field.need_judge == true"
|
||||
prop="low_limit"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="field.low_limit"
|
||||
:precision="2"
|
||||
:min="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="下限规则"
|
||||
v-if="field.need_judge == true"
|
||||
prop="low_rule"
|
||||
>
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="field.low_rule"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in lowoptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
!-->
|
||||
<el-form-item label="判定式" v-if="field.need_judge === true">
|
||||
<el-input v-model="field.rule_expression" type="textarea"/>
|
||||
</el-form-item>
|
||||
|
@ -556,7 +527,7 @@
|
|||
const defaultfield = {};
|
||||
let preDrawAry = [];
|
||||
export default {
|
||||
components: {Pagination, vueJsonEditor, Treeselect, customForm,faceLogin},
|
||||
components: {Pagination, vueJsonEditor, Treeselect, customForm, faceLogin},
|
||||
data() {
|
||||
return {
|
||||
step: defaultstep,
|
||||
|
@ -677,12 +648,31 @@
|
|||
label: "绘图模板",
|
||||
},
|
||||
],
|
||||
typeoptions: [
|
||||
typeOptions: [
|
||||
{
|
||||
value: 1,
|
||||
label: "生产记录",
|
||||
value: 10,
|
||||
label: "生产记录表",
|
||||
}, {
|
||||
value: 20,
|
||||
label: "工序检查表",
|
||||
}, {
|
||||
value: 30,
|
||||
label: "入场检验表",
|
||||
}, {
|
||||
value: 40,
|
||||
label: "成品检验表",
|
||||
}, {
|
||||
value: 50,
|
||||
label: "首件检查表",
|
||||
},
|
||||
],
|
||||
typeOptions_:{
|
||||
10 : "生产记录表",
|
||||
20 : "工序检查表",
|
||||
30 : "入场检验表",
|
||||
40 : "成品检验表",
|
||||
50 : "首件检查表",
|
||||
},
|
||||
canvas: null,
|
||||
ctx: null,
|
||||
myCanvas_rect: null,
|
||||
|
@ -696,8 +686,8 @@
|
|||
imgData: '',
|
||||
canvasImg: '',
|
||||
judgeList: [],
|
||||
limitedPhoto:false,
|
||||
isDisabled:true,
|
||||
limitedPhoto: false,
|
||||
isDisabled: true,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
@ -850,7 +840,7 @@
|
|||
},
|
||||
recordformLists() {
|
||||
this.listQueryrecordform.material = this.material;
|
||||
this.listQueryrecordform.type = 2;
|
||||
// this.listQueryrecordform.type = 2;
|
||||
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||
if (response.data) {
|
||||
this.recordformList = response.data;
|
||||
|
@ -895,21 +885,20 @@
|
|||
//新增字段
|
||||
handlefieldCreate() {
|
||||
this.field_choice = [""];
|
||||
// this.field = Object.assign({}, defaultfield);
|
||||
this.dialogType1 = "new";
|
||||
this.dialogVisible1 = true;
|
||||
// this.$refs["Form"].resetFields();
|
||||
this.$nextTick(() => {
|
||||
this.field.field_type= null;
|
||||
this.field.field_key= null;
|
||||
this.field.field_name= null;
|
||||
this.field.sort= null;
|
||||
this.field.parent= null;
|
||||
this.field.help_text= null;
|
||||
this.field.draw_template= null;
|
||||
this.field.field_choice= null;
|
||||
this.field.rule_expression= null;
|
||||
this.field.display_expression= null;
|
||||
this.field.field_type = null;
|
||||
this.field.field_key = null;
|
||||
this.field.field_name = null;
|
||||
this.field.sort = null;
|
||||
this.field.parent = null;
|
||||
this.field.help_text = null;
|
||||
this.field.draw_template = null;
|
||||
this.field.field_choice = null;
|
||||
this.field.rule_expression = null;
|
||||
this.field.display_expression = null;
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
|
@ -965,10 +954,12 @@
|
|||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
let obj = new Object();
|
||||
obj.name=this.recordform.name;
|
||||
obj.type=this.recordform.type;
|
||||
obj.enabled=this.recordform.enabled;
|
||||
if (isEdit) {
|
||||
this.recordform.material = this.material;
|
||||
this.recordform.type = 2;
|
||||
updaterecordform(this.recordform.id, this.recordform).then(
|
||||
updaterecordform(this.recordform.id, obj).then(
|
||||
(res) => {
|
||||
if (res.code >= 200) {
|
||||
this.recordformLists();
|
||||
|
@ -978,9 +969,8 @@
|
|||
}
|
||||
);
|
||||
} else {
|
||||
this.recordform.material = this.material;
|
||||
this.recordform.type = 2;
|
||||
createrecordform(this.recordform).then((res) => {
|
||||
obj.material=parseInt(this.material);
|
||||
createrecordform(obj).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.recordformLists();
|
||||
this.dialogVisible = false;
|
||||
|
@ -1011,8 +1001,6 @@
|
|||
} else {
|
||||
this.field.form = this.formID;
|
||||
this.field.field_choice = this.field_choice;
|
||||
debugger;
|
||||
console.log(this.field);
|
||||
createrffield(this.field).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.fieldLists();
|
||||
|
@ -1027,12 +1015,12 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
recordformcon(){
|
||||
recordformcon() {
|
||||
this.recordform.material = this.material;
|
||||
this.recordform.type = 2;
|
||||
this.limitedPhoto = true;
|
||||
},
|
||||
getMsgFormSon(data){
|
||||
getMsgFormSon(data) {
|
||||
this.limitedPhoto = data;
|
||||
this.recordformLists();
|
||||
this.dialogVisible = false;
|
||||
|
|
|
@ -1,282 +1,310 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card >
|
||||
<div slot="header" class="clearfix">
|
||||
<span>合同订单列表</span>
|
||||
|
||||
</div>
|
||||
<el-button type="primary" @click="handlecount"
|
||||
>计算物料</el-button>
|
||||
<el-table
|
||||
:data="orderList.results"
|
||||
ref="multipleTable"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 25}"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="订单编号" width="110">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="所需产品" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="产品数量">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已派数量">
|
||||
<template slot-scope="scope">{{ scope.row.planed_count }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="产品型号">
|
||||
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户名称" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">{{ scope.row.customer_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">{{ scope.row.contract_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">{{ scope.row.contract_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货日期" width="110">
|
||||
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" width="110">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划生产数" width="150px" fixed="right">
|
||||
<template slot-scope="scope" >
|
||||
<el-form :model="scope.row">
|
||||
<el-form-item size="mini">
|
||||
<el-input-number v-model="scope.row.pgcount" :min="0" :value="0"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="orderList.count > 0"
|
||||
:total="orderList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getorderList"
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card >
|
||||
<div slot="header" class="clearfix">
|
||||
<span>物料配置</span>
|
||||
<el-button style="float: right; padding: 3px 0" @click="handlebcpcount" type="primary">半成品折合</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="materialpzTable"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="300"
|
||||
ref="multipleTables"
|
||||
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<el-table-column label="物料名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料类型">
|
||||
<template slot-scope="scope"> {{options_[scope.row.type]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编号">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产所需数量" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.type==2">
|
||||
<el-form :model="scope.row">
|
||||
<el-form-item size="mini">
|
||||
<el-input-number v-model="scope.row.bcpcount" :min="0" :value="0"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div v-else> {{ scope.row.count }}</div></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="剩余量" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.count_safe!=null&&scope.row.count_safe>(scope.row.inv_count-scope.row.count)" type="danger"> {{ scope.row.inv_count-scope.row.count }}</el-tag>
|
||||
<el-tag v-else> {{ scope.row.inv_count-scope.row.count }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安全库存">
|
||||
<template slot-scope="scope">{{ scope.row.count_safe }}</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card >
|
||||
<div slot="header" class="clearfix">
|
||||
<span>设备配置</span>
|
||||
|
||||
</div>
|
||||
<el-table
|
||||
:data="equipmentTable"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="280"
|
||||
>
|
||||
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<el-table-column label="设备名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备状态">
|
||||
<el-col :span="12">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>合同订单列表</span>
|
||||
</div>
|
||||
<el-button type="primary" @click="handlecount">计算物料</el-button>
|
||||
<el-table
|
||||
:data="orderList.results"
|
||||
ref="multipleTable"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{ bottomOffset: 25 }"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.equip_.type===2">
|
||||
<el-tag v-if="scope.row.equip_.state===40" type="danger">
|
||||
禁用
|
||||
</el-tag>
|
||||
<el-tag v-else type="success">
|
||||
合格
|
||||
</el-tag>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-tag v-if="scope.row.state===10" type="success">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===20">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state===30" type="warning">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="danger">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="scope"> {{state_[scope.row.state]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号">
|
||||
<template slot-scope="scope"> {{scope.row.number}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备型号">
|
||||
<template slot-scope="scope"> {{scope.row.model}}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="equipmentTable.count > 0"
|
||||
:total="equipmentTable.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getorderList"
|
||||
/>
|
||||
|
||||
</el-card>
|
||||
<el-table-column label="订单编号" width="110">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="所需产品" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.product_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="产品数量">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已派数量">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.planed_count
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="产品型号">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.product_.specification
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户名称" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.customer_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.contract_.number
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" show-overflow-tooltip width="150">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.contract_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货日期" width="110">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.delivery_date
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" width="110">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.create_time
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划生产数" width="150px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-form :model="scope.row">
|
||||
<el-form-item size="mini">
|
||||
<el-input-number
|
||||
v-model="scope.row.pgcount"
|
||||
:min="0"
|
||||
:value="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="orderList.count > 0"
|
||||
:total="orderList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getorderList"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>物料配置</span>
|
||||
<el-button
|
||||
style="float: right; "
|
||||
@click="handlebcpcount"
|
||||
type="primary"
|
||||
v-if="butshow"
|
||||
>半成品折合</el-button
|
||||
>
|
||||
</div>
|
||||
<el-table
|
||||
:data="materialpzTable"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="330"
|
||||
ref="multipleTables"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<el-table-column label="物料名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料类型">
|
||||
<template slot-scope="scope">
|
||||
{{ options_[scope.row.type] }}</template
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编号">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产所需数量" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.type == 2">
|
||||
<el-form :model="scope.row">
|
||||
<el-form-item size="mini">
|
||||
<el-input-number
|
||||
v-model="scope.row.bcpcount"
|
||||
:min="0"
|
||||
:value="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div v-else>{{ scope.row.count }}</div></template
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="剩余量">
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
v-if="
|
||||
scope.row.count_safe != null &&
|
||||
scope.row.count_safe >
|
||||
scope.row.inv_count - scope.row.count
|
||||
"
|
||||
type="danger"
|
||||
>
|
||||
{{ scope.row.inv_count - scope.row.count }}</el-tag
|
||||
>
|
||||
<el-tag v-else>
|
||||
{{ scope.row.inv_count - scope.row.count }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安全库存">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.count_safe
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>设备配置</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="equipmentTable"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="280"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<el-table-column label="设备名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备状态">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.equip_.type === 2">
|
||||
<el-tag
|
||||
v-if="scope.row.equip_.state === 40"
|
||||
type="danger"
|
||||
>
|
||||
禁用
|
||||
</el-tag>
|
||||
<el-tag v-else type="success"> 合格 </el-tag>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-tag v-if="scope.row.state === 10" type="success">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === 20">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.state === 30" type="warning">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="danger">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
{{ state_[scope.row.state] }}</template
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.number }}</template
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备型号">
|
||||
<template slot-scope="scope"> {{ scope.row.model }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="equipmentTable.count > 0"
|
||||
:total="equipmentTable.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getorderList"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getordertoplan } from "@/api/sam";
|
||||
import { createProductionplan,createConvert,createresource,createequip} from "@/api/pm";
|
||||
import { getordertoplan } from "@/api/sam";
|
||||
import {
|
||||
createProductionplan,
|
||||
createConvert,
|
||||
createresource,
|
||||
createequip,
|
||||
} from "@/api/pm";
|
||||
import { getMaterialList } from "@/api/mtm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaulteorderplan = {
|
||||
};
|
||||
const defaulteorderplan = {};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
||||
orderplan: defaulteorderplan,
|
||||
orderplan: defaulteorderplan,
|
||||
orderList: {
|
||||
count: 0,
|
||||
},
|
||||
options_:{
|
||||
|
||||
"1":'成品',
|
||||
"2":'半成品',
|
||||
"3":'主要原料',
|
||||
"4":'辅助原料',
|
||||
"5":'加工工具',
|
||||
"6":'辅助工具',
|
||||
|
||||
options_: {
|
||||
1: "成品",
|
||||
2: "半成品",
|
||||
3: "主要原料",
|
||||
4: "辅助原料",
|
||||
5: "加工工具",
|
||||
6: "辅助工具",
|
||||
},
|
||||
state_: {
|
||||
10: '完好',
|
||||
20: '限用',
|
||||
30: '在修',
|
||||
40: '禁用',
|
||||
},
|
||||
10: "完好",
|
||||
20: "限用",
|
||||
30: "在修",
|
||||
40: "禁用",
|
||||
},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
materialpzTable:"",
|
||||
mutipID:[],
|
||||
bcpID:[],
|
||||
equipmentTable:[],
|
||||
materialpzTable: [],
|
||||
mutipID: [],
|
||||
bcpID: [],
|
||||
equipmentTable: [],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
zhbcp:[],
|
||||
zhbcp: [],
|
||||
rule1: {
|
||||
number: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
|
||||
},
|
||||
butshow:true,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
this.getorderList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//订单列表
|
||||
//订单列表
|
||||
getorderList() {
|
||||
this.listLoading = true;
|
||||
getordertoplan(this.listQuery).then((response) => {
|
||||
|
@ -286,88 +314,81 @@ export default {
|
|||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
//物料计算
|
||||
handlecount()
|
||||
{
|
||||
|
||||
let _this=this
|
||||
_this.mutipID=[]
|
||||
this.$refs.multipleTable.selection.forEach((item) => {
|
||||
_this.mutipID.push({
|
||||
"id":item.product_.id,
|
||||
"count": item.pgcount
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
createresource(this.mutipID).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.materialpzTable=res.data;
|
||||
this.$message.success("物料计算成功");
|
||||
}
|
||||
});
|
||||
createequip(this.mutipID).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.equipmentTable=res.data;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//半成品折合物料
|
||||
handlebcpcount(){
|
||||
let _this=this
|
||||
_this.bcpID=[]
|
||||
this.$refs.multipleTables.selection.forEach((item) => {
|
||||
_this.bcpID.push({
|
||||
"id":item.id,
|
||||
"count": item.bcpcount
|
||||
//物料计算
|
||||
handlecount() {
|
||||
let _this = this;
|
||||
this.butshow=true;
|
||||
_this.mutipID = [];
|
||||
this.$refs.multipleTable.selection.forEach((item) => {
|
||||
_this.mutipID.push({
|
||||
id: item.product_.id,
|
||||
count: item.pgcount,
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
createresource(this.mutipID).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.materialpzTable = res.data;
|
||||
this.$message.success("物料计算成功");
|
||||
}
|
||||
});
|
||||
createequip(this.mutipID).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.equipmentTable = res.data;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
_this.zhbcp=[],
|
||||
createConvert(this.bcpID).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.zhbcp= res.data
|
||||
|
||||
//半成品折合物料
|
||||
handlebcpcount() {
|
||||
let _this = this;
|
||||
_this.bcpID = [];
|
||||
this.$refs.multipleTables.selection.forEach((item) => {
|
||||
_this.bcpID.push({
|
||||
id: item.id,
|
||||
count: item.bcpcount,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
createConvert(this.bcpID).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.materialpzTable.forEach((items) => {
|
||||
res.data.forEach((item) => {
|
||||
if (item.id == items.id) {
|
||||
items.count = items.count - item.count;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
console.log(this.materialpzTable);
|
||||
this.butshow=false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleclick(scope) {
|
||||
this.orderID = scope.row.id;
|
||||
|
||||
handleclick(scope){
|
||||
this.orderID = scope.row.id;
|
||||
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
|
||||
},
|
||||
async confirm(form) {
|
||||
|
||||
this.orderplan.start_date = this.value1[0];
|
||||
this.orderplan.end_date = this.value1[1];
|
||||
this.orderplan.order = this.orderID
|
||||
this.orderplan.start_date = this.value1[0];
|
||||
this.orderplan.end_date = this.value1[1];
|
||||
this.orderplan.order = this.orderID;
|
||||
createProductionplan(this.orderplan).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getorderList();
|
||||
this.getplanList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
if (res.code >= 200) {
|
||||
this.getorderList();
|
||||
this.getplanList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
</script>
|
||||
</script>
|
|
@ -806,7 +806,7 @@ filediv.innerHTML=' <div id="wordView" v-html='+this.wordText+' />';
|
|||
{
|
||||
this.pdf=tab.name;
|
||||
var filediv = document.getElementById('file');
|
||||
filediv.innerHTML=' <frame width=800 height=900 frameborder=0 scrolling=auto src='+tab.name+'></frame>';
|
||||
filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto src='+tab.name+'></iframe>';
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue