Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
bd904eaa73
|
@ -143,7 +143,14 @@ export function deleteOperationwproduct(id) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//半成品摆放位置
|
||||||
|
export function wproductPlace(id, data) {
|
||||||
|
return request({
|
||||||
|
url: `/wpm/operation_wproduct/${id}/`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
//删除操作记录
|
//删除操作记录
|
||||||
export function deleteOperation(id) {
|
export function deleteOperation(id) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -21,21 +21,21 @@
|
||||||
<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="180px" >
|
<el-table-column label="产品名称" width="180px" >
|
||||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
<template slot-scope="scope" v-if="scope.row.product_">{{ scope.row.product_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品型号" >
|
<el-table-column label="产品型号" >
|
||||||
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
|
<template slot-scope="scope" v-if="scope.row.product_">{{ scope.row.product_.specification }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="名称" width="160px">
|
<el-table-column label="名称" width="160px">
|
||||||
<template slot-scope="scope">{{ scope.row.subproduction_.name }}</template>
|
<template slot-scope="scope" v-if="scope.row.subproduction_">{{ scope.row.subproduction_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="工序名" >
|
<el-table-column label="工序名" >
|
||||||
<template slot-scope="scope">{{ scope.row.process_.name }}</template>
|
<template slot-scope="scope" v-if="scope.row.process_" >{{ scope.row.process_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="工序编号">
|
<el-table-column label="工序编号">
|
||||||
<template slot-scope="scope">{{ scope.row.process_.number }}</template>
|
<template slot-scope="scope" v-if="scope.row.process_">{{ scope.row.process_.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="子工序" width="200">
|
<el-table-column label="子工序" width="200">
|
||||||
<template slot-scope="scope" v-if="scope.row.steps">
|
<template slot-scope="scope" v-if="scope.row.steps">
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="生产车间" width="100px">
|
<el-table-column label="生产车间" width="100px">
|
||||||
<template slot-scope="scope">{{ 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 label="生产数量">
|
<el-table-column label="生产数量">
|
||||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
|
|
|
@ -162,12 +162,13 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属合同" prop="contract">
|
<el-form-item label="所属合同" prop="contract">
|
||||||
<el-select style="width: 100%" v-model="order.contract" placeholder="请选择">
|
<el-select style="width: 100%" v-model="order.contract" @change="selectcontract" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in contractoptions"
|
v-for="item in contractoptions"
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
:key="item.id"
|
||||||
:value="item.value">
|
:label="item.name+'____'+item.number"
|
||||||
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -184,7 +185,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getOrderList, createOrder,updateOrder,deleteOrder,getContractList,getCustomerList } from "@/api/sam";
|
import { getOrderList, createOrder,updateOrder,deleteOrder,getContractList,getCustomerList,getContract } from "@/api/sam";
|
||||||
import { getMaterialList } from "@/api/mtm";
|
import { getMaterialList } from "@/api/mtm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
@ -193,6 +194,7 @@ 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 defaulteorder = {
|
const defaulteorder = {
|
||||||
need_mtest:false,
|
need_mtest:false,
|
||||||
|
customer:""
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
|
@ -253,7 +255,7 @@ export default {
|
||||||
|
|
||||||
getContractList({pageoff:true}).then((response) => {
|
getContractList({pageoff:true}).then((response) => {
|
||||||
|
|
||||||
this.contractoptions = genTree(response.data);
|
this.contractoptions = response.data;
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -265,7 +267,16 @@ export default {
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
selectcontract(selval)
|
||||||
|
{
|
||||||
|
getContract(selval).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
console.log(response.data);
|
||||||
|
this.order.customer = response.data.customer_.name;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
handleFilter() {
|
handleFilter() {
|
||||||
this.listQuery.page = 1;
|
this.listQuery.page = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
|
@ -4,9 +4,12 @@
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>基本信息</span>
|
<span>基本信息</span>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
style="float: right; padding: 3px 0"
|
||||||
<el-button style="float: right; padding: 3px 0" @click="getWordText()" type="text">查看作业指导书</el-button>
|
@click="getWordText()"
|
||||||
|
type="text"
|
||||||
|
>查看作业指导书</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-form
|
<el-form
|
||||||
ref="form"
|
ref="form"
|
||||||
|
@ -34,7 +37,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" style="float: right" @click="handlesubmit()" v-if="operationData.is_submited==false"
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="float: right"
|
||||||
|
@click="handlesubmit()"
|
||||||
|
v-if="operationData.is_submited == false"
|
||||||
>提交本次操作</el-button
|
>提交本次操作</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -62,7 +69,8 @@
|
||||||
title="作业指导书查看!"
|
title="作业指导书查看!"
|
||||||
:visible.sync="drawer"
|
:visible.sync="drawer"
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
size="70%">
|
size="70%"
|
||||||
|
>
|
||||||
<el-tabs @tab-click="handleClick">
|
<el-tabs @tab-click="handleClick">
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:key="item.file_.id"
|
:key="item.file_.id"
|
||||||
|
@ -73,7 +81,6 @@
|
||||||
></el-tab-pane>
|
></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div class="word-wrap" id="file"></div>
|
<div class="word-wrap" id="file"></div>
|
||||||
|
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-row gutter="2">
|
<el-row gutter="2">
|
||||||
|
@ -93,7 +100,7 @@
|
||||||
height="230"
|
height="230"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="subproduction_plan_.number"
|
prop="subproduction_plan_.number"
|
||||||
label="子计划编号"
|
label="子计划编号"
|
||||||
|
@ -103,9 +110,13 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="material_.name" label="玻璃状态">
|
<el-table-column prop="material_.name" label="玻璃状态">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="place" label="摆放位置">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="100px">
|
<el-table-column align="center" label="操作" width="100px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-link type="primary" @click="handleupdatewproduct(scope)"
|
||||||
|
>编辑</el-link
|
||||||
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
|
@ -115,6 +126,31 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogwproductplace"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="60%"
|
||||||
|
title="半成品摆放位置"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="wproductplace"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="right"
|
||||||
|
>
|
||||||
|
<el-form-item label="位置" prop="place">
|
||||||
|
<el-input v-model="wproductplace.place" placeholder="位置" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="dialogwproductplace = false"
|
||||||
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="submitwproductplace"
|
||||||
|
>确认</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -143,9 +179,7 @@
|
||||||
<el-tag v-if="scope.row.equip_.state === 40" type="danger">
|
<el-tag v-if="scope.row.equip_.state === 40" type="danger">
|
||||||
禁用
|
禁用
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="success">
|
<el-tag v-else type="success"> 合格 </el-tag>
|
||||||
合格
|
|
||||||
</el-tag>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-tag v-if="scope.row.equip_.state === 10" type="success">
|
<el-tag v-if="scope.row.equip_.state === 10" type="success">
|
||||||
|
@ -154,7 +188,10 @@
|
||||||
<el-tag v-else-if="scope.row.equip_.state === 20">
|
<el-tag v-else-if="scope.row.equip_.state === 20">
|
||||||
{{ state_[scope.row.equip_.state] }}
|
{{ state_[scope.row.equip_.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else-if="scope.row.equip_.state===30" type="warning">
|
<el-tag
|
||||||
|
v-else-if="scope.row.equip_.state === 30"
|
||||||
|
type="warning"
|
||||||
|
>
|
||||||
{{ state_[scope.row.equip_.state] }}
|
{{ state_[scope.row.equip_.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="danger">
|
<el-tag v-else type="danger">
|
||||||
|
@ -205,7 +242,6 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
|
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handlerecord(scope)"
|
@click="handlerecord(scope)"
|
||||||
>填写表单</el-link
|
>填写表单</el-link
|
||||||
|
@ -220,7 +256,10 @@
|
||||||
:title="fieldList.name"
|
:title="fieldList.name"
|
||||||
>
|
>
|
||||||
<el-form label-width="80px" label-position="right">
|
<el-form label-width="80px" label-position="right">
|
||||||
<el-row v-for="(item, $index) in fieldList.record_data" :key="$index">
|
<el-row
|
||||||
|
v-for="(item, $index) in fieldList.record_data"
|
||||||
|
:key="$index"
|
||||||
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="item.field_type === 'string'"
|
v-if="item.field_type === 'string'"
|
||||||
:label="item.field_name"
|
:label="item.field_name"
|
||||||
|
@ -352,14 +391,12 @@
|
||||||
label="子计划编号"
|
label="子计划编号"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="batch" label="物料批次">
|
<el-table-column prop="batch" label="物料批次"> </el-table-column>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="material_.name" label="物料名称">
|
<el-table-column prop="material_.name" label="物料名称">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="material_.unit" label="物料单位">
|
<el-table-column prop="material_.unit" label="物料单位">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="count" label="消耗数量">
|
<el-table-column prop="count" label="消耗数量"> </el-table-column>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="操作" width="100px">
|
<el-table-column align="center" label="操作" width="100px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
|
@ -371,7 +408,11 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-dialog title="车间物料" :close-on-click-modal="false" :visible.sync="dialogTablepick">
|
<el-dialog
|
||||||
|
title="车间物料"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="dialogTablepick"
|
||||||
|
>
|
||||||
<el-table
|
<el-table
|
||||||
:data="wmaterialData"
|
:data="wmaterialData"
|
||||||
border
|
border
|
||||||
|
@ -381,15 +422,9 @@
|
||||||
max-height="400"
|
max-height="400"
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column type="selection" width="55"> </el-table-column>
|
||||||
type="selection"
|
|
||||||
width="55">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column
|
<el-table-column label="子计划编号">
|
||||||
|
|
||||||
label="子计划编号"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{
|
||||||
scope.row.subproduction_plan_.number
|
scope.row.subproduction_plan_.number
|
||||||
}}</template>
|
}}</template>
|
||||||
|
@ -405,14 +440,10 @@
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料批次">
|
<el-table-column label="物料批次">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{ scope.row.batch }}</template>
|
||||||
scope.row.batch
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="车间物料数量">
|
<el-table-column label="车间物料数量">
|
||||||
<template slot-scope="scope">{{
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
scope.row.count
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="实际使用数量" width="140px">
|
<el-table-column label="实际使用数量" width="140px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -439,10 +470,13 @@
|
||||||
</el-table-column>!-->
|
</el-table-column>!-->
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogTablepick = false">取消</el-button>
|
<el-button type="danger" @click="dialogTablepick = false"
|
||||||
<el-button type="primary" @click="handlepicks()">提交</el-button>
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="handlepicks()"
|
||||||
|
>提交</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -479,7 +513,11 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="count" label="产出数量"> </el-table-column>
|
<el-table-column prop="count" label="产出数量"> </el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-dialog title="产出物料" :close-on-click-modal="false" :visible.sync="dialogTableoutput">
|
<el-dialog
|
||||||
|
title="产出物料"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="dialogTableoutput"
|
||||||
|
>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tprogressData"
|
:data="tprogressData"
|
||||||
border
|
border
|
||||||
|
@ -489,10 +527,7 @@
|
||||||
max-height="400"
|
max-height="400"
|
||||||
ref="multipleTables"
|
ref="multipleTables"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column type="selection" width="55"> </el-table-column>
|
||||||
type="selection"
|
|
||||||
width="55">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
<el-table-column label="子计划编号">
|
<el-table-column label="子计划编号">
|
||||||
|
@ -511,7 +546,11 @@
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划/产出/合格">
|
<el-table-column label="计划/产出/合格">
|
||||||
<template slot-scope="scope">{{ scope.row.count }}/{{ scope.row.count_real }}/{{ scope.row.count_ok }}</template>
|
<template slot-scope="scope"
|
||||||
|
>{{ scope.row.count }}/{{ scope.row.count_real }}/{{
|
||||||
|
scope.row.count_ok
|
||||||
|
}}</template
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="本操作产出数量" width="140px">
|
<el-table-column label="本操作产出数量" width="140px">
|
||||||
|
@ -532,9 +571,7 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-form :model="scope.row" widht="100px">
|
<el-form :model="scope.row" widht="100px">
|
||||||
<el-form-item size="mini">
|
<el-form-item size="mini">
|
||||||
<el-switch
|
<el-switch v-model="scope.row.use_scrap"></el-switch>
|
||||||
v-model="scope.row.use_scrap"
|
|
||||||
></el-switch>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
@ -550,8 +587,12 @@
|
||||||
</el-table-column>!-->
|
</el-table-column>!-->
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogTableoutput = false">取消</el-button>
|
<el-button type="danger" @click="dialogTableoutput = false"
|
||||||
<el-button type="primary" @click="handleoutputs()">提交</el-button>
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="handleoutputs()"
|
||||||
|
>提交</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -571,31 +612,22 @@
|
||||||
height="230"
|
height="230"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
<el-table-column prop="material_.name" label="物料名称">
|
<el-table-column prop="material_.name" label="物料名称">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="material_.unit" label="物料单位">
|
<el-table-column prop="material_.unit" label="物料单位">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.word-wrap {
|
.word-wrap {
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
};
|
}
|
||||||
.box-card {
|
.box-card {
|
||||||
height: 300px;
|
height: 300px;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
@ -619,7 +651,8 @@ import {
|
||||||
createInputs,
|
createInputs,
|
||||||
recordInit,
|
recordInit,
|
||||||
createOutputs,
|
createOutputs,
|
||||||
deleteOperationeinput
|
deleteOperationeinput,
|
||||||
|
wproductPlace,
|
||||||
} from "@/api/wpm";
|
} from "@/api/wpm";
|
||||||
import mammoth from "mammoth";
|
import mammoth from "mammoth";
|
||||||
import { getrffieldList, gettechdocList } from "@/api/mtm";
|
import { getrffieldList, gettechdocList } from "@/api/mtm";
|
||||||
|
@ -642,10 +675,10 @@ export default {
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
state_: {
|
state_: {
|
||||||
10: '完好',
|
10: "完好",
|
||||||
20: '限用',
|
20: "限用",
|
||||||
30: '在修',
|
30: "在修",
|
||||||
40: '禁用',
|
40: "禁用",
|
||||||
},
|
},
|
||||||
scrap: [
|
scrap: [
|
||||||
{ lable: "使用", value: true },
|
{ lable: "使用", value: true },
|
||||||
|
@ -655,12 +688,14 @@ export default {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
wproductplace: {},
|
||||||
operationData: "",
|
operationData: "",
|
||||||
scrapData: {},
|
scrapData: {},
|
||||||
dialogVisibleForm: false,
|
dialogVisibleForm: false,
|
||||||
tableForm: {
|
tableForm: {
|
||||||
name: "",
|
name: "",
|
||||||
},
|
},
|
||||||
|
dialogwproductplace: false,
|
||||||
listQueryrecordform: {
|
listQueryrecordform: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
|
@ -670,7 +705,7 @@ export default {
|
||||||
},
|
},
|
||||||
fieldList: {
|
fieldList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
name:'',
|
name: "",
|
||||||
},
|
},
|
||||||
listQueryfield: {
|
listQueryfield: {
|
||||||
page: 1,
|
page: 1,
|
||||||
|
@ -777,8 +812,7 @@ export default {
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
console.log(tab.name);
|
console.log(tab.name);
|
||||||
var str = tab.label.substr(tab.label.length - 1, 1);
|
var str = tab.label.substr(tab.label.length - 1, 1);
|
||||||
if(str=='x')
|
if (str == "x") {
|
||||||
{
|
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
|
|
||||||
xhr.open("get", tab.name, true);
|
xhr.open("get", tab.name, true);
|
||||||
|
@ -787,44 +821,40 @@ export default {
|
||||||
|
|
||||||
xhr.onload = () => {
|
xhr.onload = () => {
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
|
mammoth
|
||||||
mammoth.convertToHtml({ arrayBuffer: new Uint8Array(xhr.response) }).then((resultObject) => {
|
.convertToHtml({ arrayBuffer: new Uint8Array(xhr.response) })
|
||||||
|
.then((resultObject) => {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
||||||
this.wordText = resultObject.value;
|
this.wordText = resultObject.value;
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.send();
|
xhr.send();
|
||||||
var filediv = document.getElementById('file');
|
var filediv = document.getElementById("file");
|
||||||
filediv.innerHTML=' <div id="wordView" v-html='+this.wordText+' />';
|
filediv.innerHTML =
|
||||||
|
' <div id="wordView" v-html=' + this.wordText + " />";
|
||||||
}
|
} else if (str == "f") {
|
||||||
else if (str=='f')
|
|
||||||
{
|
|
||||||
this.pdf = tab.name;
|
this.pdf = tab.name;
|
||||||
var filediv = document.getElementById('file');
|
var filediv = document.getElementById("file");
|
||||||
filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto src='+tab.name+'></iframe>';
|
filediv.innerHTML =
|
||||||
|
" <iframe width=1000 height=900 frameborder=0 scrolling=auto src=" +
|
||||||
|
tab.name +
|
||||||
|
"></iframe>";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getWordText() {
|
getWordText() {
|
||||||
this.drawer = true;
|
this.drawer = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
readbook() {
|
readbook() {
|
||||||
|
gettechdocList({ operation: this.id, page: 0, enabled: true }).then(
|
||||||
gettechdocList({operation:this.id,page:0,enabled:true}).then((response) => {
|
(response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.techdocList = response.data;
|
this.techdocList = response.data;
|
||||||
console.log(this.techdocList);
|
console.log(this.techdocList);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
//是否使用边角料
|
//是否使用边角料
|
||||||
|
@ -856,6 +886,21 @@ filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto s
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
//半成品摆放的位置
|
||||||
|
handleupdatewproduct(scope) {
|
||||||
|
this.dialogwproductplace = true;
|
||||||
|
this.wproductplaceID=scope.row.id;
|
||||||
|
},
|
||||||
|
submitwproductplace() {
|
||||||
|
|
||||||
|
wproductPlace(this.wproductplaceID, this.wproductplace).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getpwpList();
|
||||||
|
this.dialogwproductplace = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
//操作半成品删除
|
//操作半成品删除
|
||||||
handleDeletewproduct(scope) {
|
handleDeletewproduct(scope) {
|
||||||
this.$confirm("确认删除该半成品?", "警告", {
|
this.$confirm("确认删除该半成品?", "警告", {
|
||||||
|
@ -900,11 +945,13 @@ filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto s
|
||||||
},
|
},
|
||||||
//操作自定义表
|
//操作自定义表
|
||||||
getrecordLists() {
|
getrecordLists() {
|
||||||
getrecordList({ operation: this.id, page: 0,enabled:true }).then((response) => {
|
getrecordList({ operation: this.id, page: 0, enabled: true }).then(
|
||||||
|
(response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.recordData = response.data;
|
this.recordData = response.data;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
//调出表单内容
|
//调出表单内容
|
||||||
handlerecord(scope) {
|
handlerecord(scope) {
|
||||||
|
@ -922,13 +969,11 @@ filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto s
|
||||||
|
|
||||||
//工序工装列表
|
//工序工装列表
|
||||||
gettoolList() {
|
gettoolList() {
|
||||||
gettoolList({ operation: this.id, page: 0 }).then(
|
gettoolList({ operation: this.id, page: 0 }).then((response) => {
|
||||||
(response) => {
|
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.tool = response.data;
|
this.tool = response.data;
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//提交表单内容
|
//提交表单内容
|
||||||
|
@ -936,10 +981,10 @@ filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto s
|
||||||
let _this = this;
|
let _this = this;
|
||||||
_this.record_data = []; //检查项目
|
_this.record_data = []; //检查项目
|
||||||
this.fieldList.record_data.forEach((item) => {
|
this.fieldList.record_data.forEach((item) => {
|
||||||
if(item.field_type==='int'){
|
if (item.field_type === "int") {
|
||||||
item.field_value = parseInt(item.field_value)
|
item.field_value = parseInt(item.field_value);
|
||||||
}else if(item.field_type==='float'){
|
} else if (item.field_type === "float") {
|
||||||
item.field_value = parseFloat(item.field_value)
|
item.field_value = parseFloat(item.field_value);
|
||||||
}
|
}
|
||||||
_this.record_data.push({
|
_this.record_data.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
|
@ -961,7 +1006,6 @@ filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto s
|
||||||
getinputLists() {
|
getinputLists() {
|
||||||
getinputList({ operation: this.id, page: 0 }).then((response) => {
|
getinputList({ operation: this.id, page: 0 }).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
|
||||||
this.inputData = response.data;
|
this.inputData = response.data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -994,7 +1038,6 @@ filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto s
|
||||||
},
|
},
|
||||||
//消耗物料删除
|
//消耗物料删除
|
||||||
handleDeleteinput(scope) {
|
handleDeleteinput(scope) {
|
||||||
|
|
||||||
this.$confirm("确认删除该消耗物料操作?", "警告", {
|
this.$confirm("确认删除该消耗物料操作?", "警告", {
|
||||||
confirmButtonText: "确认",
|
confirmButtonText: "确认",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
|
@ -1011,37 +1054,28 @@ filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto s
|
||||||
},
|
},
|
||||||
//车间领料批量提交
|
//车间领料批量提交
|
||||||
handlepicks() {
|
handlepicks() {
|
||||||
|
|
||||||
|
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
|
||||||
this.pickDatas=[],
|
(this.pickDatas = []),
|
||||||
this.$refs.multipleTable.selection.forEach((item) => {
|
this.$refs.multipleTable.selection.forEach((item) => {
|
||||||
if(item.pick_count>0)
|
if (item.pick_count > 0) {
|
||||||
{
|
|
||||||
this.pickDatas.push({
|
this.pickDatas.push({
|
||||||
"operation" :this.id,
|
operation: this.id,
|
||||||
"wmaterial":item.id,
|
wmaterial: item.id,
|
||||||
"count": item.pick_count,
|
count: item.pick_count,
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
createInputs(this.pickDatas).then((res) => {
|
createInputs(this.pickDatas).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.dialogTablepick = false;
|
this.dialogTablepick = false;
|
||||||
this.$message.success("提交成功!");
|
this.$message.success("提交成功!");
|
||||||
_this.getinputLists();
|
_this.getinputLists();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//操作产出物料列表
|
//操作产出物料列表
|
||||||
getoutputLists() {
|
getoutputLists() {
|
||||||
getoutputList({ operation: this.id, page: 0 }).then((response) => {
|
getoutputList({ operation: this.id, page: 0 }).then((response) => {
|
||||||
|
@ -1077,22 +1111,16 @@ filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto s
|
||||||
},
|
},
|
||||||
//车间产出物料批量提交
|
//车间产出物料批量提交
|
||||||
handleoutputs() {
|
handleoutputs() {
|
||||||
|
(this.outputDatas = []),
|
||||||
|
|
||||||
this.outputDatas=[],
|
|
||||||
this.$refs.multipleTables.selection.forEach((item) => {
|
this.$refs.multipleTables.selection.forEach((item) => {
|
||||||
if(item.output_count>0)
|
if (item.output_count > 0) {
|
||||||
{
|
|
||||||
this.outputDatas.push({
|
this.outputDatas.push({
|
||||||
"operation" :this.id,
|
operation: this.id,
|
||||||
"subproduction_progress":item.id,
|
subproduction_progress: item.id,
|
||||||
"count": item.output_count,
|
count: item.output_count,
|
||||||
"use_scrap":item.use_scrap
|
use_scrap: item.use_scrap,
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
createOutputs(this.outputDatas).then((res) => {
|
createOutputs(this.outputDatas).then((res) => {
|
||||||
|
@ -1101,18 +1129,15 @@ filediv.innerHTML=' <iframe width=1000 height=900 frameborder=0 scrolling=auto s
|
||||||
|
|
||||||
this.$message.success("提交成功!");
|
this.$message.success("提交成功!");
|
||||||
this.getoutputLists();
|
this.getoutputLists();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//提交本次操作
|
//提交本次操作
|
||||||
handlesubmit() {
|
handlesubmit() {
|
||||||
submitOperation(this.id).then((res) => {
|
submitOperation(this.id).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.$router.push({name: "operation" })
|
this.$router.push({ name: "operation" });
|
||||||
this.$message.success("操作提交成功!");
|
this.$message.success("操作提交成功!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue