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