Commit 1c34f423 authored by renjintao's avatar renjintao

ordermaterial

parent ae72e548
......@@ -4,7 +4,7 @@
<template>
<div class="new_box">
<span class="mr10">订单编号:{{mescodes}}</span>
<Button v-if="materialbillStatuss==-1" type="primary" @click="saveBill">生成料单</Button>
<Button v-if="materialbillStatuss!=1" type="primary" @click="saveBill">生成料单</Button>
<Table stripe ref="table" border :columns="columns" :data="datas" class="tableCommon mt5"></Table>
</div>
</template>
......@@ -17,10 +17,10 @@ export default {
return {
isview: false,
mescodes: this.mesCode,
materialbillStatuss: this.materialbillStatus,
routingHeaderId: this.mainRoutingID,
orderId:this.id,
orderCount:this.quantity,
materialbillStatuss: this.materialBillSetStatus,
routingHeaderId: this.mainRoutingID,
orderId: this.id,
orderCount: this.quantity,
datas: [],
columns: [
{
......@@ -52,7 +52,7 @@ export default {
align: "left"
},
{
key: "quantity",
key: "totalCount",
title: this.l("quantity"),
align: "right",
width: 80
......@@ -99,28 +99,44 @@ export default {
};
},
props: {
mesCode: String,
materialbillStatus: Number,
materialBillSetStatus: Number,
mainRoutingID: Number,
id: Number,
quantity: Number,
},
mounted() {
quantity: Number
},
mounted() {},
created() {},
methods: {
saveBill() {},
loaddata() {
saveBill() {
let params = {
routingHeaderId: this.routingHeaderId,
orderId: this.orderId,
orderCount: this.orderCount
};
Api.post(
`${technologyUrl}materiallist/createnew`,
params
).then(res => {});
Api.post(`${technologyUrl}materiallist/createnew`, params).then(res => {
if (res.success) {
this.materialbillStatuss = 1;
this.$emit("on-ok");
this.loaddata(this.orderId);
}
});
},
loaddata(ids) {
let condtions = {
conditions: [
{
fieldName: "orderId",
fieldValue: ids,
conditionalType: "In"
}
]
};
Api.post(`${technologyUrl}materiallist/list`, condtions).then(res => {
if (res.success) {
this.datas = res.result;
}
});
},
l(key) {
key = "routingsupporting" + "." + key;
......@@ -135,16 +151,23 @@ export default {
mesCode(v) {
this.mescodes = v;
},
materialbillStatus(v) {
this.materialbillStatuss = v;
materialBillSetStatus(v) {
if (v == 1) {
this.materialbillStatuss = v;
} else {
this.materialbillStatuss = -1;
}
},
id(v)
{
this.orderId=v
id(v) {
this.orderId = v;
if (this.materialBillSetStatus == 1) {
this.loaddata(v);
} else {
this.datas = [];
}
},
quantity(v)
{
this.orderCount=v
quantity(v) {
this.orderCount = v;
}
}
};
......
......@@ -295,17 +295,18 @@
v-model="modalliao"
title="料单"
class="model_tabel"
fullscreen="true"
fullscreen
:mask-closable="false"
:loading="myloading"
>
<orderMaterial
ref="orderMaterial"
:mesCode="mesCode"
:materialbillStatus="materialbillStatus"
:materialBillSetStatus="materialBillSetStatus"
:mainRoutingID="mainRoutingID"
:id="id"
:quantity="quantity"
@on-ok="ok"
></orderMaterial>
<div slot="footer">
<Button type="text" size="large" @click="saveCancelModel">关闭</Button>
......@@ -647,7 +648,7 @@ export default {
content1 = gh[0].name;
editColor1 = gh[0].color;
}
if (params.row.materialbillStatus > 1) {
if (params.row.materialBillSetStatus==1) {
content1 = "查看";
}
return h("div", [
......@@ -685,7 +686,7 @@ export default {
//料单设置
mainRoutingID: null,
mesCode: "",
materialbillStatus: null,
materialBillSetStatus: null,
id: null,
quantity: null
};
......@@ -779,6 +780,9 @@ export default {
},
search() {
this.easySearch(this.orderSearchForm);
},
ok() {
this.easySearch(this.orderSearchForm);
},
//搜索查询
easySearch(params) {
......@@ -1592,7 +1596,7 @@ export default {
savematerialbillNew(params) {
this.modalliao = true;
this.mesCode = params.row.mesCode;
this.materialbillStatus = params.row.materialbillStatus;
this.materialBillSetStatus = params.row.materialBillSetStatus;
this.mainRoutingID = params.row.mainRoutingID;
this.id=params.row.id;
this.quantity=params.row.quantity;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment