Commit bd1c4d8b authored by kangzhenfei's avatar kangzhenfei

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product

parents 1a97ca47 0601ef31
This diff is collapsed.
...@@ -156,7 +156,8 @@ export default { ...@@ -156,7 +156,8 @@ export default {
title: this.l('materialType'), title: this.l('materialType'),
align: 'left', align: 'left',
easy: true, easy: true,
high: true high: true,
slot:"materialType"
}, },
{ {
key: 'brand', key: 'brand',
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<state <state
code="mes_xingchi_resource.material.materialReType" code="mes_xingchi_resource.material.materialReType"
type="text" type="text"
:value="row.materialType" :value="row.material_type"
></state> ></state>
</template> </template>
</Table> </Table>
...@@ -67,13 +67,7 @@ ...@@ -67,13 +67,7 @@
width="830px" width="830px"
:footer-hide="isview" :footer-hide="isview"
> >
<Form <Form ref="formprocessValidate" :model="formprocessValidate" :label-width="120" inline>
ref="formprocessValidate"
:model="formprocessValidate"
:label-width="120"
inline
>
<Row> <Row>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('materialNumber')" prop="materialNumber"> <FormItem :label="l('materialNumber')" prop="materialNumber">
...@@ -82,7 +76,7 @@ ...@@ -82,7 +76,7 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('nameMaterial')" prop="nameMaterial"> <FormItem :label="l('nameMaterial')" prop="nameMaterial">
<Input v-model="formprocessValidate.nameMaterial"></Input> <Input v-model="formprocessValidate.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -95,18 +89,18 @@ ...@@ -95,18 +89,18 @@
<FormItem :label="l('materialType')" prop="materialType"> <FormItem :label="l('materialType')" prop="materialType">
<Dictionary <Dictionary
code="mes_xingchi_resource.material.materialReType" code="mes_xingchi_resource.material.materialReType"
v-model="formprocessValidate.materialType" v-model="formprocessValidate.material_type"
></Dictionary> ></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('brand')" prop="brand"> <FormItem :label="l('brand')" prop="brand">
<Input v-model="formprocessValidate.brand"></Input> <Input v-model="formprocessValidate.pate_number"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('specifications')" prop="specifications"> <FormItem :label="l('specifications')" prop="specifications">
<Input v-model="formprocessValidate.specifications"></Input> <Input v-model="formprocessValidate.spec"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -150,7 +144,7 @@ export default { ...@@ -150,7 +144,7 @@ export default {
Modeltitle: "料单", Modeltitle: "料单",
dataTop: [], dataTop: [],
isview: false, isview: false,
newModel:false, newModel: false,
columnTop: [ columnTop: [
{ {
...@@ -259,25 +253,33 @@ export default { ...@@ -259,25 +253,33 @@ export default {
}, },
formValidate1: [], formValidate1: [],
formprocessValidate: { formprocessValidate: {
id: 0,
materialbillId: 0,
material_type: 0,
name: "",
pate_number: "",
spec: "",
categories: "",
quantity: 0,
singlequantity: 0,
quantity_unit: "",
estimated_part_height: 0,
height_unit: "",
lower_basal_plate: 0,
plate_unit: "",
use_equip: "",
remarks: "",
extend: "",
actual_quantity: 0,
routingHeaderId: 0, routingHeaderId: 0,
routingDetailId: 0, routingDetailId: 0,
routingStepId: 0, routingStepId: 0,
quantity: 0, supportingID: 0,
materialId: 0,
materialType: "",
materialNumber: "", materialNumber: "",
nameMaterial: "",
state: 0,
extend: "",
remark: "",
brand: "",
specifications: "",
xhgg: "", xhgg: "",
texture: "", texture: "",
procurementStandards: "", procurementStandards: "",
qualityGrade: "", qualityGrade: ""
id: 0
}, },
column1: [ column1: [
{ title: "序号", type: "index", width: "70", align: "center" }, { title: "序号", type: "index", width: "70", align: "center" },
...@@ -289,7 +291,7 @@ export default { ...@@ -289,7 +291,7 @@ export default {
high: true high: true
}, },
{ {
key: "nameMaterial", key: "name",
title: this.l("nameMaterial"), title: this.l("nameMaterial"),
align: "left", align: "left",
easy: true, easy: true,
...@@ -303,21 +305,22 @@ export default { ...@@ -303,21 +305,22 @@ export default {
}, },
{ {
key: "materialType", key: "material_type",
title: this.l("materialType"), title: this.l("materialType"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
slot: "materialType"
}, },
{ {
key: "brand", key: "pate_number",
title: this.l("brand"), title: this.l("brand"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "specifications", key: "spec",
title: this.l("specifications"), title: this.l("specifications"),
align: "left", align: "left",
easy: true, easy: true,
...@@ -416,11 +419,10 @@ export default { ...@@ -416,11 +419,10 @@ export default {
label: val label: val
}); });
}, },
l(key) { l(key) {
key = "RoutingSupporting" + "." + key; key = "RoutingSupporting" + "." + key;
return this.$t(key) return this.$t(key);
} },
,
loaddata() { loaddata() {
if (this.formValidate.id != 0) { if (this.formValidate.id != 0) {
var url = var url =
...@@ -512,12 +514,10 @@ export default { ...@@ -512,12 +514,10 @@ export default {
this.formValidate.ordercodes = mesCodes.toString(","); this.formValidate.ordercodes = mesCodes.toString(",");
service service
.post( .post(`${url}`, {
`${url}`,{ orderMaterial: this.formValidate,
orderMaterial: this.formValidate, orderMaterialList: this.formValidate1
orderMaterialList: this.formValidate1 })
}
)
.then(response => { .then(response => {
let itemId = response.result.orderMaterial.id; let itemId = response.result.orderMaterial.id;
// let idIteme = this.$parent.$parent.dataListRetrunNew.idList // let idIteme = this.$parent.$parent.dataListRetrunNew.idList
...@@ -558,33 +558,58 @@ export default { ...@@ -558,33 +558,58 @@ export default {
return; return;
} }
var url = `${designUrl}/ordermateriallist/createorupdate`; if (this.formValidate.id == 0) {
this.formValidate1.push(this.formprocessValidate);
service } else {
.post(`${url}`, this.formprocessValidate) var url = `${designUrl}/ordermateriallist/createorupdate`;
.then(response => {
if (response.success) { service
this.$Message.success("保存成功"); .post(`${url}`, this.formprocessValidate)
this.newModel = false; .then(response => {
this.cleardata(); if (response.success) {
this.$Message.success("保存成功");
this.loaddata(); this.newModel = false;
} this.cleardata();
}) this.loaddata();
.catch(error => { }
this.$Message.error("保存失败"); })
}); .catch(error => {
this.$Message.error("保存失败");
});
}
}, },
editFun(params) { editFun(params) {
this.formprocessValidate.id = params.row.id; this.formprocessValidate.id = params.row.id;
this.formprocessValidate.quantity = params.row.quantity; this.formprocessValidate.materialbillId = params.row.materialbillId;
this.formprocessValidate.material_type = params.row.material_type;
this.formprocessValidate.name = params.row.name;
this.formprocessValidate.spec = params.row.spec;
this.formprocessValidate.pate_number = params.row.pate_number;
this.formprocessValidate.categories = params.row.categories;
this.formprocessValidate.materialId = params.row.materialId; this.formprocessValidate.materialId = params.row.materialId;
this.formprocessValidate.materialType = params.row.materialType;
this.formprocessValidate.materialNumber = params.row.materialNumber; this.formprocessValidate.materialNumber = params.row.materialNumber;
this.formprocessValidate.nameMaterial = params.row.nameMaterial; this.formprocessValidate.nameMaterial = params.row.nameMaterial;
this.formprocessValidate.brand = params.row.brand; this.formprocessValidate.brand = params.row.brand;
this.formprocessValidate.specifications = params.row.specifications; this.formprocessValidate.quantity = params.row.quantity;
this.formprocessValidate.singlequantity = params.row.singlequantity;
this.formprocessValidate.quantity_unit = params.row.quantity_unit;
this.formprocessValidate.estimated_part_height =
params.row.estimated_part_height;
this.formprocessValidate.height_unit = params.row.height_unit;
this.formprocessValidate.lower_basal_plate = params.row.lower_basal_plate;
this.formprocessValidate.plate_unit = params.row.plate_unit;
this.formprocessValidate.use_equip = params.row.use_equip;
this.formprocessValidate.remarks = params.row.remarks;
this.formprocessValidate.extend = params.row.extend;
this.formprocessValidate.actual_quantity = params.row.actual_quantity;
this.formprocessValidate.routingHeaderId = params.row.routingHeaderId;
this.formprocessValidate.routingDetailId = params.row.routingDetailId;
this.formprocessValidate.routingStepId = params.row.routingStepId;
this.formprocessValidate.supportingID = params.row.supportingID;
this.formprocessValidate.xhgg = params.row.xhgg; this.formprocessValidate.xhgg = params.row.xhgg;
this.formprocessValidate.texture = params.row.texture; this.formprocessValidate.texture = params.row.texture;
this.formprocessValidate.procurementStandards = this.formprocessValidate.procurementStandards =
...@@ -598,20 +623,27 @@ export default { ...@@ -598,20 +623,27 @@ export default {
title: "提示", title: "提示",
content: "确定要删除当前行?", content: "确定要删除当前行?",
onOk: () => { onOk: () => {
var url = `${designUrl}/ordermateriallist/delete?id=` + params.row.id; if (this.formValidate.id == 0) {
service
.delete(`${url}`) this.formValidate1.push(this.formprocessValidate);
.then(response => {
if (response.success) { } else {
this.$Message.success("删除成功"); var url =
this.loaddata(); `${designUrl}/ordermateriallist/delete?id=` + params.row.id;
} else { service
.delete(`${url}`)
.then(response => {
if (response.success) {
this.$Message.success("删除成功");
} else {
this.$Message.error("删除失败");
}
})
.catch(error => {
this.$Message.error("删除失败"); this.$Message.error("删除失败");
} });
}) }
.catch(error => {
this.$Message.error("删除失败");
});
}, },
onCancel: () => {} onCancel: () => {}
}); });
......
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