Commit ae72e548 authored by renjintao's avatar renjintao

ordermaterial

parent 31c166a5
<style lang="less">
@import "../../../processDesign/Process/menu.less";
</style>
<template>
<div class="new_box">
<span class="mr10">订单编号:{{mescodes}}</span>
<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>
<script>
import Api from "@/plugins/request";
export default {
name: "orderMaterialNew",
data() {
return {
isview: false,
mescodes: this.mesCode,
materialbillStatuss: this.materialbillStatus,
routingHeaderId: this.mainRoutingID,
orderId:this.id,
orderCount:this.quantity,
datas: [],
columns: [
{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
align: "left",
width: 100
},
{
key: "routingDetailName",
title: this.l("routingDetailName"),
align: "left"
},
{
key: "materialType",
title: this.l("materialType"),
align: "center",
code: "mes_xingchi_resource.material.materialReType",
width: 100
},
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left"
},
{
key: "nameMaterial",
title: this.l("nameMaterial"),
align: "left"
},
{
key: "quantity",
title: this.l("quantity"),
align: "right",
width: 80
},
{
key: "brand",
title: this.l("brand"),
align: "left"
},
{
key: "specifications",
title: this.l("specifications"),
align: "left"
},
{
key: "xhgg",
title: this.l("xhgg"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "texture",
title: this.l("texture"),
align: "left"
},
{
key: "procurementStandards",
title: this.l("procurementStandards"),
align: "left"
},
{
key: "qualityGrade",
title: this.l("qualityGrade"),
align: "left"
},
{
key: "drawNum",
title: this.l("drawNum"),
align: "left"
}
]
};
},
props: {
mesCode: String,
materialbillStatus: Number,
mainRoutingID: Number,
id: Number,
quantity: Number,
},
mounted() {
},
created() {},
methods: {
saveBill() {},
loaddata() {
let params = {
routingHeaderId: this.routingHeaderId,
orderId: this.orderId,
orderCount: this.orderCount
};
Api.post(
`${technologyUrl}materiallist/createnew`,
params
).then(res => {});
},
l(key) {
key = "routingsupporting" + "." + key;
return this.$t(key);
}
},
watch: {
mainRoutingID(v) {
this.routingHeaderId = v;
this.loaddata();
},
mesCode(v) {
this.mescodes = v;
},
materialbillStatus(v) {
this.materialbillStatuss = v;
},
id(v)
{
this.orderId=v
},
quantity(v)
{
this.orderCount=v
}
}
};
</script>
\ No newline at end of file
<template> <template>
<Layout class="lay100"> <Layout class="lay100">
<!-- <div> --> <!-- <div> -->
<!-- 左侧树 --> <!-- 左侧树 -->
<!-- <Sider hide-trigger v-if="showMenu" class="menu_side" width="300"> --> <!-- <Sider hide-trigger v-if="showMenu" class="menu_side" width="300"> -->
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
@on-select-change="selectTreeNode" @on-select-change="selectTreeNode"
></Tree> ></Tree>
</div> </div>
</Sider> --> </Sider>-->
<!-- </div> --> <!-- </div> -->
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300"> <Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" /> <ProductTree @on-hide="onHide" @on-select="productSearch" />
...@@ -293,23 +293,25 @@ ...@@ -293,23 +293,25 @@
</Modal> </Modal>
<Modal <Modal
v-model="modalliao" v-model="modalliao"
title="创建料单" title="料单"
class="model_tabel" class="model_tabel"
:width="1040" fullscreen="true"
:mask-closable="false" :mask-closable="false"
:loading="myloading" :loading="myloading"
> >
<orderMaterial ref="orderMaterial"></orderMaterial> <orderMaterial
<div v-if="!ismview" slot="footer" v-model="greateArtmodel"> ref="orderMaterial"
<Button type="text" size="large" @click="saveCancelModel">取消</Button> :mesCode="mesCode"
<Button type="primary" size="large" @click="Seveld" class="mr20">确定</Button> :materialbillStatus="materialbillStatus"
<!-- <Button type="primary" size="large" @click="nextStep">送审</Button> footer-hide--> :mainRoutingID="mainRoutingID"
<!-- <Checkbox v-model="checked" label="送审">送审</Checkbox> --> :id="id"
</div> :quantity="quantity"
<div v-else slot="footer" v-model="greateArtmodel"> ></orderMaterial>
<Button type="text" size="large" @click="saveCancelModel">取消</Button> <div slot="footer">
<Button type="text" size="large" @click="saveCancelModel">关闭</Button>
</div> </div>
</Modal> </Modal>
<!-- 料单送审 --> <!-- 料单送审 -->
<Modal <Modal
v-model="modalInfo" v-model="modalInfo"
...@@ -356,7 +358,7 @@ ...@@ -356,7 +358,7 @@
<script> <script>
import DrawerSet from "./components/drawerSet.vue"; //抽屉列表 import DrawerSet from "./components/drawerSet.vue"; //抽屉列表
import orderMaterial from "./components/orderMaterial.vue"; //料单 import orderMaterial from "./components/orderMaterialNew.vue"; //料单
import processMain from "./processMain.vue"; import processMain from "./processMain.vue";
import processNew from "../Process/processNew.vue"; import processNew from "../Process/processNew.vue";
...@@ -452,8 +454,8 @@ export default { ...@@ -452,8 +454,8 @@ export default {
projectNumber: "", //项目号 projectNumber: "", //项目号
batchNumber: "", //批次号 batchNumber: "", //批次号
urgencyLevel: null, //紧急程度 urgencyLevel: null, //紧急程度
MaxResultCount:10, MaxResultCount: 10,
SkipCount:0, SkipCount: 0
}, },
formValidate: { formValidate: {
id: "", id: "",
...@@ -491,27 +493,24 @@ export default { ...@@ -491,27 +493,24 @@ export default {
value: "", value: "",
column: [], column: [],
historycolumn: [ historycolumn: [
{ type: "selection", width: 70, align: "center", fixed: "left" }, { type: "selection", width: 70, align: "center" },
{ {
title: "序号", title: "序号",
key: "id", key: "id",
width: 80, width: 80,
align: "center", align: "center"
fixed: "left"
}, },
{ {
title: "订单编号", title: "订单编号",
key: "mesCode", key: "mesCode",
width: 180, width: 180,
align: "center", align: "center"
fixed: "left"
}, },
{ {
title: "任务类型", title: "任务类型",
key: "taskTypeName", key: "taskTypeName",
width: 120, width: 120,
align: "center", align: "center",
fixed: "left",
render: (h, params) => { render: (h, params) => {
return h("state", { return h("state", {
props: { props: {
...@@ -526,8 +525,7 @@ export default { ...@@ -526,8 +525,7 @@ export default {
title: "产品名称", title: "产品名称",
key: "productName", key: "productName",
width: 120, width: 120,
align: "center", align: "center"
fixed: "left"
}, },
{ title: "图号", key: "drawnNumber", width: 120 }, { title: "图号", key: "drawnNumber", width: 120 },
{ title: "项目号", key: "projectNumber", width: 120 }, { title: "项目号", key: "projectNumber", width: 120 },
...@@ -648,8 +646,8 @@ export default { ...@@ -648,8 +646,8 @@ export default {
if (gh != null && gh.length > 0) { if (gh != null && gh.length > 0) {
content1 = gh[0].name; content1 = gh[0].name;
editColor1 = gh[0].color; editColor1 = gh[0].color;
} if(params.row.materialbillStatus>1) }
{ if (params.row.materialbillStatus > 1) {
content1 = "查看"; content1 = "查看";
} }
return h("div", [ return h("div", [
...@@ -667,8 +665,7 @@ export default { ...@@ -667,8 +665,7 @@ export default {
on: { on: {
click: e => { click: e => {
e.stopPropagation(); e.stopPropagation();
this.savematerialbillNew(params);
this.savematerialbill(params);
} }
} }
}, },
...@@ -684,7 +681,13 @@ export default { ...@@ -684,7 +681,13 @@ export default {
orderselected: null, orderselected: null,
addpdefm: null, addpdefm: null,
detailInfo: {} //送审所需信息 detailInfo: {}, //送审所需信息
//料单设置
mainRoutingID: null,
mesCode: "",
materialbillStatus: null,
id: null,
quantity: null
}; };
}, },
created() { created() {
...@@ -709,7 +712,8 @@ export default { ...@@ -709,7 +712,8 @@ export default {
}; };
}, },
computed: { computed: {
searchList() {//产品树左侧 searchList() {
//产品树左侧
let nodeList = this.treeData; let nodeList = this.treeData;
var text = this.treeInputSearch; var text = this.treeInputSearch;
var newNodeList = []; var newNodeList = [];
...@@ -792,7 +796,8 @@ export default { ...@@ -792,7 +796,8 @@ export default {
// 分页 // 分页
pageChange(num) { pageChange(num) {
this.page = num; this.page = num;
this.orderSearchForm.SkipCount = (num - 1) * this.orderSearchForm.MaxResultCount; this.orderSearchForm.SkipCount =
(num - 1) * this.orderSearchForm.MaxResultCount;
// console.log(this.orderSearchForm.SkipCount); // console.log(this.orderSearchForm.SkipCount);
this.loaddata(this.orderSearchForm); this.loaddata(this.orderSearchForm);
}, },
...@@ -804,11 +809,11 @@ export default { ...@@ -804,11 +809,11 @@ export default {
}, },
loaddata(params) { loaddata(params) {
var url = ""; var url = "";
this.orderSearchForm.simpleSearch= typeof params == "string" ? params : params.simpleSearch, //快速搜索 (this.orderSearchForm.simpleSearch =
typeof params == "string" ? params : params.simpleSearch), //快速搜索
this.orderSearchForm.ProcessUserType= this.tabstatus, (this.orderSearchForm.ProcessUserType = this.tabstatus),
this.orderSearchForm.ProductingPreparation= this.ProductingPreparationPeople, (this.orderSearchForm.ProductingPreparation = this.ProductingPreparationPeople),
this.orderSearchForm.RoutingSetStatus= this.orderSearchForm.RoutingSetStatus (this.orderSearchForm.RoutingSetStatus = this.orderSearchForm.RoutingSetStatus);
url = url =
`${PlanUrl}/mesorder/getpagedmesordersforpdefm?` + `${PlanUrl}/mesorder/getpagedmesordersforpdefm?` +
QS.stringify(this.orderSearchForm); QS.stringify(this.orderSearchForm);
...@@ -1584,7 +1589,14 @@ export default { ...@@ -1584,7 +1589,14 @@ export default {
console.log(err); console.log(err);
}); });
}, },
savematerialbillNew(params) {
this.modalliao = true;
this.mesCode = params.row.mesCode;
this.materialbillStatus = params.row.materialbillStatus;
this.mainRoutingID = params.row.mainRoutingID;
this.id=params.row.id;
this.quantity=params.row.quantity;
},
savematerialbill(params) { savematerialbill(params) {
this.modalliao = true; this.modalliao = true;
let ld = this.$refs.orderMaterial; let ld = this.$refs.orderMaterial;
......
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