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