Commit 7be98c2e authored by 康振飞's avatar 康振飞

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

parents 8574fad5 330b2550
......@@ -406,8 +406,7 @@ export default {
var url =
`${designUrl}/routingheader/GetListSmall?approvalstatus=1&product_id=` +
productid +
'&routingType=' +
this.formValidate.routingType
'&routingType=0';
service.get(`${url}`).then((response) => {
this.RoutingList = response.result
})
......
<template>
<div>
<Table stripe ref="table" :columns="columnTop" :data="dataTop" border class="tableCommon"></Table>
<Table
v-if="false"
stripe
ref="table"
:columns="columnTop"
:data="dataTop"
border
class="tableCommon"
></Table>
<Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="160" inline>
<!-- <Row>
......@@ -34,248 +42,6 @@
:disabled="isview"
/>
</FormItem>
<FormItem label="板数">
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate.platesnum"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
</Row>
<Row>
<FormItem label="每板定额" style="width:400px">
<!-- <Select style="width:240px;" v-model="formValidate.quota_per_board" placeholder="请选择...">
<Option
v-for="(item,index) in quotaperboardList"
:value="item.value"
:label="item.name"
:key="index"
></Option>
</Select>-->
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate.quota_per_board"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
</Row>
<Divider orientation="left" style="color:#249e91">粉末信息</Divider>
<Row>
<FormItem label="粉末名称">
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[0].name"
placeholder="请选择..."
>
<Option
v-for="(item,index) in fmnameList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[0].name" :dic="fmnameList" ref="fmnameList"></materialDic> -->
</FormItem>
<FormItem label="粉末牌号">
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[0].pate_number"
placeholder="请选择..."
>
<Option
v-for="(item,index) in fmpatenumberList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[0].pate_number" :dic="fmpatenumberList" ref="fmpatenumberList"></materialDic> -->
</FormItem>
</Row>
<Row>
<FormItem label="粉末规格">
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[0].spec"
placeholder="请选择..."
>
<Option
v-for="(item,index) in fmspceList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[0].spec" :dic="fmspceList" ref="fmspceList"></materialDic> -->
</FormItem>
<FormItem label="粉末类别">
<!-- <Select style="width:240px;" v-model="formValidate1[0].categories" placeholder="请选择...">
<Option
v-for="(item,index) in fmcategoriesList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>-->
<Dictionary
code="mes_xingchi_resource.material.powderType"
style="width:240px"
v-model="formValidate1[0].categories"
:disabled="isview"
></Dictionary>
<!-- <materialDic v-model="formValidate1[0].categories" :dic="fmcategoriesList" ref="fmcategoriesList"></materialDic> -->
</FormItem>
</Row>
<Row>
<FormItem label="预估粉末总量" prop="fmquantity">
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate1[0].quantity"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
<FormItem label="预估零件高度">
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate1[0].estimated_part_height"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
</Row>
<Divider orientation="left" style="color:#249e91">基板信息</Divider>
<Row>
<FormItem label="基板名称">
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[1].name"
placeholder="请选择..."
>
<Option
v-for="(item,index) in jbnameList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[1].name" :dic="jbnameList" ref="jbnameList"></materialDic> -->
</FormItem>
<FormItem label="基板牌号">
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[1].pate_number"
placeholder="请选择..."
>
<Option
v-for="(item,index) in jbPateNumberList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[1].pate_number" :dic="jbPateNumberList" ref="jbPateNumberList"></materialDic> -->
</FormItem>
</Row>
<Row>
<FormItem label="基板规格">
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[1].spec"
placeholder="请选择..."
>
<Option
v-for="(item,index) in jbspecList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[1].spec" :dic="jbspecList" ref="jbspecList"></materialDic> -->
</FormItem>
<FormItem label="基板适用设备">
<Select
allow-create
@on-create="handleCreate1"
style="width:240px;"
v-model="formValidate1[1].use_equip"
placeholder="请选择..."
:disabled="isview"
>
<Option
v-for="(item,index) in EquipList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[1].use_equip" :dic="EquipList" ref="EquipList"></materialDic> -->
</FormItem>
</Row>
<Row>
<FormItem label="基板厚度下限">
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate1[1].lower_basal_plate"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
<FormItem label="基板总量" prop="jbquantity">
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate1[1].quantity"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
</Row>
<Divider orientation="left" style="color:#249e91">刮刀信息</Divider>
<Row>
<FormItem label="刮刀规格" prop="gdspec">
<Select
style="width:240px;"
:disabled="isview"
v-model="formValidate1[2].spec"
placeholder="请选择..."
>
<Option
v-for="(item,index) in gdspecList"
:value="item.value"
:label="item.lable"
:key="index"
></Option>
</Select>
<!-- <materialDic v-model="formValidate1[2].spec" :dic="gdspecList" ref="gdspec"></materialDic> -->
</FormItem>
<FormItem label="刮刀数量" prop="gdquantity">
<InputNumber
placeholder="请输入..."
:min="0"
v-model="formValidate1[2].quantity"
style="width:240px"
:disabled="isview"
></InputNumber>
</FormItem>
</Row>
</Form>
<!-- <div>
......@@ -283,86 +49,160 @@
<Button type="primary" size="large" @click="Seveld" class="mr20">确定</Button>
<Checkbox v-model="checked" label="送审">送审</Checkbox>
</div>-->
<Table stripe ref="table" border :columns="column1" :data="formValidate1" class="tableCommon">
<template slot-scope="{ row,index }" slot="materialType">
<state
code="mes_xingchi_resource.material.materialReType"
type="text"
:value="row.materialType"
></state>
</template>
</Table>
<Modal
v-model="newModel"
title="新增物料项"
:mask-closable="false"
@on-ok="ok"
@on-cancel="cancel"
width="830px"
:footer-hide="isview"
>
<Form
ref="formprocessValidate"
:model="formprocessValidate"
:label-width="120"
inline
>
<Row>
<Col :span="12">
<FormItem :label="l('materialNumber')" prop="materialNumber">
<Input v-model="formprocessValidate.materialNumber"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('nameMaterial')" prop="nameMaterial">
<Input v-model="formprocessValidate.nameMaterial"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('quantity')" prop="quantity">
<InputNumber v-model="formprocessValidate.quantity"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('materialType')" prop="materialType">
<Dictionary
code="mes_xingchi_resource.material.materialReType"
v-model="formprocessValidate.materialType"
></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('brand')" prop="brand">
<Input v-model="formprocessValidate.brand"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('specifications')" prop="specifications">
<Input v-model="formprocessValidate.specifications"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('xhgg')" prop="xhgg">
<Input v-model="formprocessValidate.xhgg"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('texture')" prop="texture">
<Input v-model="formprocessValidate.texture"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('procurementStandards')" prop="procurementStandards">
<Input v-model="formprocessValidate.procurementStandards"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('qualityGrade')" prop="qualityGrade">
<Input v-model="formprocessValidate.qualityGrade"></Input>
</FormItem>
</Col>
</Row>
</Form>
</Modal>
</div>
</template>
<script>
import service from '@/plugins/request'
import materialDic from '../components/materialDic'
import service from "@/plugins/request";
import materialDic from "../components/materialDic";
export default {
name: 'orderMaterial',
name: "orderMaterial",
components: { materialDic },
data() {
return {
order_comb_id: 0,
orderids: '',
productingPreparationPeople:'',
taskType: '',
Modeltitle: '料单',
orderids: "",
productingPreparationPeople: "",
taskType: "",
Modeltitle: "料单",
dataTop: [],
isview: false,
newModel:false,
columnTop: [
{
title: '订单编号',
key: 'mesCode',
align: 'center'
title: "订单编号",
key: "mesCode",
align: "center"
},
{
title: '产品名称',
key: 'productName',
align: 'center'
title: "产品名称",
key: "productName",
align: "center"
},
{
title: '产品代号',
key: 'drawnNumber',
align: 'center'
title: "产品代号",
key: "drawnNumber",
align: "center"
},
{
title: '数量',
key: 'quantity',
align: 'center'
title: "数量",
key: "quantity",
align: "center"
},
{
title: '每板数量',
key: 'perboardnum',
align: 'center',
title: "每板数量",
key: "perboardnum",
align: "center",
render: (h, params) => {
if (this.isview) {
return h('div', this.dataTop[params.index].perboardnum)
return h("div", this.dataTop[params.index].perboardnum);
} else {
return h('div', [
h('InputNumber', {
return h("div", [
h("InputNumber", {
props: {
value: this.dataTop[params.index].perboardnum,
min: 1
},
on: {
'on-change': (event) => {
this.dataTop[params.index].perboardnum = event
this.calcplatesnum()
"on-change": event => {
this.dataTop[params.index].perboardnum = event;
this.calcplatesnum();
}
}
})
])
]);
}
}
}
],
quotaperboardList: [], //每版定额
fileTemplateList: [], //文件模板
jbnameList: [], //基板名称
jbPateNumberList: [], //基板牌号
jbspecList: [], //基板规格
fmcategoriesList: [], //粉末种类
fmspceList: [], //粉末规格
fmpatenumberList: [], //粉末牌号
fmnameList: [], //粉末名称,
gdspecList: [], //刮刀规格,
EquipList: [],
ruleValidate: {
code: [{ required: true, message: '文件编号不能为空', trigger: 'blur' }]
code: [{ required: true, message: "文件编号不能为空", trigger: "blur" }]
// name: [
// { required: true, message: '文件名称不能为空', trigger: 'blur' }
......@@ -403,248 +243,273 @@ export default {
formValidate: {
id: 0,
code: '',
name: '',
code: "",
name: "",
platesnum: 0,
quota_per_board: 0,
file_template: '',
remarks: '',
extend: '',
file_template: "",
remarks: "",
extend: "",
order_comb_id: 0,
orderids: '',
productingPreparationPeople:'',
ordercodes: '',
orderids: "",
routingHeaderId: 0,
productingPreparationPeople: "",
ordercodes: "",
approvalStatus: 0
},
formValidate1: [
formValidate1: [],
formprocessValidate: {
routingHeaderId: 0,
routingDetailId: 0,
routingStepId: 0,
quantity: 0,
materialId: 0,
materialType: "",
materialNumber: "",
nameMaterial: "",
state: 0,
extend: "",
remark: "",
brand: "",
specifications: "",
xhgg: "",
texture: "",
procurementStandards: "",
qualityGrade: "",
id: 0
},
column1: [
{ title: "序号", type: "index", width: "70", align: "center" },
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
easy: true,
high: true
},
{
key: "nameMaterial",
title: this.l("nameMaterial"),
align: "left",
easy: true,
high: true
},
{
key: "quantity",
title: this.l("quantity"),
align: "left",
high: true
},
{
key: "materialType",
title: this.l("materialType"),
align: "left",
easy: true,
high: true
},
{
id: 0,
materialbillId: 0,
material_type: 1,
name: '',
pate_number: '',
spec: '',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
key: "brand",
title: this.l("brand"),
align: "left",
easy: true,
high: true
},
{
id: 0,
materialbillId: 0,
material_type: 2,
name: '',
pate_number: '',
spec: '',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
key: "specifications",
title: this.l("specifications"),
align: "left",
easy: true,
high: true
},
{
id: 0,
materialbillId: 0,
material_type: 3,
name: '',
pate_number: '',
spec: 'sssss',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
key: "xhgg",
title: this.l("xhgg"),
align: "left",
easy: true,
high: true
},
{
key: "texture",
title: this.l("texture"),
align: "left",
easy: true,
high: true
},
{
key: "procurementStandards",
title: this.l("procurementStandards"),
align: "left"
},
{
key: "qualityGrade",
title: this.l("qualityGrade"),
align: "left",
easy: true,
high: true
},
{
title: "操作",
key: "id",
align: "center",
render: (h, params) => {
let id = params.row.id;
if (!this.isview) {
return h(
"div",
{
class: "icon_box"
},
[
h("span", {
class: "edit_icon",
attrs: { title: "编辑" },
on: {
click: () => {
this.editFun(params);
}
}
}),
h("span", {
class: "del_icon",
attrs: { title: "删除" },
on: {
click: () => {
this.deleteFun(params);
}
}
})
]
);
} else {
return h(
"div",
{
class: "icon_box"
},
[
h("op", {
class: "view ",
attrs: { icon: "ios-eye", title: "查看", type: "icon" },
on: {
click: () => {
this.editFun(params);
}
}
})
]
);
}
}
}
]
}
};
},
mounted() {
;(this.quotaperboardList = [
{ name: '10', value: 10 },
{ name: '20', value: 20 },
{ name: '30', value: 30 }
]), //每版定额
(this.fileTemplateList = [
{ name: '文件模板1', value: '文件模板1' },
{ name: '文件模板2', value: '文件模板2' }
]) //文件模板
},
created: function() {
this.getmaterialplacodedic()
this.GetMaterialScraperDic()
this.GetMaterialPowderDic()
},
mounted() {},
created: function() {},
methods: {
handleCreate1(val) {
this.EquipList.push({
value: val,
label: val
})
});
},
l(key) {
key = "RoutingSupporting" + "." + key;
return this.$t(key)
}
,
loaddata() {
if (this.formValidate.id != 0) {
var url =
`${designUrl}/ordermaterial/getbyid?id=` + this.formValidate.id
service.get(`${url}`).then((response) => {
this.formValidate = response.result.orderMaterial
if (this.formValidate.approvalStatus == 1||this.formValidate.approvalStatus == 2||this.formValidate.approvalStatus == 3) {
this.isview = true
}else{
this.isview = false
`${designUrl}/ordersupport/getbyid?id=` + this.formValidate.id;
service.get(`${url}`).then(response => {
this.formValidate = response.result.orderMaterial;
if (
this.formValidate.approvalStatus == 1 ||
this.formValidate.approvalStatus == 2 ||
this.formValidate.approvalStatus == 3
) {
this.isview = true;
} else {
this.isview = false;
}
this.formValidate1 = response.result.orderMaterialList
})
this.formValidate1 = response.result.orderMaterialList;
});
} else {
this.cleardata()
var url = `${designUrl}/ordermaterial/getordermateriacode`
service.get(`${url}`).then((response) => {
this.formValidate.code = response.result
})
this.isview = false
this.calcplatesnum();
this.cleardata();
var url =
`${designUrl}/ordersupport/getbyheaderid?headerID=` +
this.formValidate.routingHeaderId;
service.get(`${url}`).then(response => {
this.formValidate = response.result.orderMaterial;
var url = `${designUrl}/ordersupport/getordermateriacode`;
service.get(`${url}`).then(response => {
this.formValidate.code = response.result;
});
this.isview = false;
this.formValidate1 = response.result.orderMaterialList;
});
// this.calcplatesnum();
}
},
calcplatesnum() {
//计算板数
let boardnum = 1
let boardnum = 1;
if (this.dataTop != null && this.dataTop.length > 0) {
for (let i = 0; i < this.dataTop.length; i++) {
let remainder = this.dataTop[i].quantity % this.dataTop[i].perboardnum //余数
let count = this.dataTop[i].quantity / this.dataTop[i].perboardnum //得数
let boardnum1 = remainder > 0 ? parseInt(count) + 1 : parseInt(count)
let remainder =
this.dataTop[i].quantity % this.dataTop[i].perboardnum; //余数
let count = this.dataTop[i].quantity / this.dataTop[i].perboardnum; //得数
let boardnum1 = remainder > 0 ? parseInt(count) + 1 : parseInt(count);
if (boardnum1 > boardnum) {
boardnum = boardnum1
boardnum = boardnum1;
}
}
}
this.formValidate.platesnum=boardnum;
},
getmaterialplacodedic() {
//基板
let url = `${designUrl}/ordermateriallist/getmaterialplacodedic`,
that = this
service.get(`${url}`).then((res) => {
let selectdata = res.result
selectdata.forEach((item) => {
if (item.dictype == 1) {
this.jbnameList = item.dics
}
if (item.dictype == 2) {
this.jbspecList = item.dics
}
if (item.dictype == 3) {
this.jbPateNumberList = item.dics
}
if (item.dictype == 4) {
this.EquipList = item.dics
}
})
})
},
GetMaterialPowderDic() {
//粉末
let url = `${designUrl}/ordermateriallist/getmaterialpowderdic`,
that = this
service.get(`${url}`).then((res) => {
let selectdata = res.result
selectdata.forEach((item) => {
if (item.dictype == 1) {
this.fmnameList = item.dics
}
if (item.dictype == 3) {
this.fmpatenumberList = item.dics
}
if (item.dictype == 2) {
this.fmspceList = item.dics
}
// if (item.dictype == 4) {
// this.fmcategoriesList = item.dics
// }
})
})
this.formValidate.platesnum = boardnum;
},
GetMaterialScraperDic() {
//刮刀
let url = `${designUrl}/ordermateriallist/getmaterialscraperdic`,
that = this
service.get(`${url}`).then((res) => {
let selectdata = res.result
selectdata.forEach((item) => {
if (item.dictype == 1) {
this.gdspecList = item.dics
}
})
})
},
SaveLd() {
let isvalidate = false
this.$refs['formValidate'].validate((valid) => {
let isvalidate = false;
this.$refs["formValidate"].validate(valid => {
if (valid) {
isvalidate = valid
isvalidate = valid;
} else {
}
})
});
if (!isvalidate) {
return
return;
}
var url = `${designUrl}/ordermaterial/createorupdate`
this.formValidate.order_comb_id = this.order_comb_id
this.formValidate.orderids = this.orderids
this.formValidate.productingPreparationPeople=this.productingPreparationPeople;
var pernums = new Array()
var url = `${designUrl}/ordersupport/createorupdate`;
this.formValidate.order_comb_id = this.order_comb_id;
this.formValidate.orderids = this.orderids;
this.formValidate.productingPreparationPeople = this.productingPreparationPeople;
var pernums = new Array();
for (let i = 0; i < this.dataTop.length; i++) {
let obj = this.dataTop[i]
let obj = this.dataTop[i];
pernums.push(obj.perboardnum)
pernums.push(obj.perboardnum);
}
this.formValidate.perboardnums = pernums.toString(',')
this.formValidate.perboardnums = pernums.toString(",");
var mesCodes = new Array()
var mesCodes = new Array();
for (let i = 0; i < this.dataTop.length; i++) {
let obj = this.dataTop[i]
let obj = this.dataTop[i];
mesCodes.push(obj.mesCode)
mesCodes.push(obj.mesCode);
}
this.formValidate.ordercodes = mesCodes.toString(',')
this.formValidate.ordercodes = mesCodes.toString(",");
service
.post(
......@@ -653,104 +518,120 @@ this.formValidate.productingPreparationPeople=this.productingPreparationPeople;
orderMaterialList: this.formValidate1
}
)
.then((response) => {
let itemId = response.result.orderMaterial.id
.then(response => {
let itemId = response.result.orderMaterial.id;
// let idIteme = this.$parent.$parent.dataListRetrunNew.idList
// if(idIteme == []){
// idIteme.push(itemId)
// }else{
// }
this.$parent.$parent.dataListRetrunNew.idList.push(itemId)
this.$parent.$parent.dataListRetrunNew.idList.push(itemId);
if (response.success) {
this.$Message.success('保存成功')
this.cleardata()
this.$parent.$parent.loaddata(this.$parent.$parent.orderSearchForm)
this.$parent.$parent.modalliao = false
this.$Message.success("保存成功");
this.cleardata();
this.$parent.$parent.loaddata(this.$parent.$parent.orderSearchForm);
this.$parent.$parent.modalliao = false;
}
})
.catch((error) => {
this.$Message.success('保存失败')
.catch(error => {
this.$Message.success("保存失败");
});
},
ok() {
let isvalidate = false;
this.$refs["formprocessValidate"].validate(valid => {
if (valid) {
isvalidate = valid;
} else {
}
});
if (!isvalidate) {
setTimeout(() => {
this.newModel = false;
this.$nextTick(() => {
this.newModel = true;
});
}, 5);
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("保存失败");
});
},
editFun(params) {
this.formprocessValidate.id = params.row.id;
this.formprocessValidate.quantity = params.row.quantity;
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.xhgg = params.row.xhgg;
this.formprocessValidate.texture = params.row.texture;
this.formprocessValidate.procurementStandards =
params.row.procurementStandards;
this.formprocessValidate.qualityGrade = params.row.qualityGrade;
this.newModel = true;
},
deleteFun(params) {
this.$Modal.confirm({
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 {
this.$Message.error("删除失败");
}
})
.catch(error => {
this.$Message.error("删除失败");
});
},
onCancel: () => {}
});
},
saveCancelModel() {
this.modalliao = false
this.modalliao = false;
},
cancel() {
this.cleardata()
this.cleardata();
},
cleardata() {
let obj = {
id: 0,
code: '',
name: '',
platesnum: 0,
quota_per_board: 0,
file_template: ''
}
this.formValidate = obj
let obj1 = {
id: 0,
materialbillId: 0,
material_type: 1,
name: '',
pate_number: '',
spec: '',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
}
this.formValidate1[0] = obj1
let obj2 = {
id: 0,
materialbillId: 0,
material_type: 2,
name: '',
pate_number: '',
spec: '',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
}
this.formValidate1[1] = obj2
let obj3 = {
id: 0,
materialbillId: 0,
material_type: 3,
name: '',
pate_number: '',
spec: '',
categories: '',
quantity: 0,
quantity_unit: '',
estimated_part_height: 0,
height_unit: '',
lower_basal_plate: 0,
plate_unit: '',
use_equip: '',
remarks: '',
extend: '',
actual_quantity: 0
}
this.formValidate1[2] = obj3
this.formValidate.id = 0;
this.formValidate.code = "";
this.formValidate.name = "";
this.formValidate.platesnum = 0;
this.formValidate.quota_per_board = 0;
this.formValidate.file_template = "";
this.formValidate1 = null;
}
}
}
};
</script>
\ No newline at end of file
......@@ -526,7 +526,7 @@ export default {
{
title: '主工艺',
title: '工艺规程',
key: 'mainRoutingID',
width: 120,
render: (h, params) => {
......@@ -610,7 +610,7 @@ export default {
key: 'materialbillID',
width: 120,
render: (h, params) => {
if (this.tabstatus == '1') {
if (params.row.mainRoutingID == 0) {
h('div', '')
} else {
let id = params.row.id
......@@ -1660,6 +1660,8 @@ export default {
ld.orderids = orderids.toString(',')
ld.formValidate.routingHeaderId = params.row.mainRoutingID
ld.formValidate.id = params.row.materialbillID
ld.loaddata()
......
......@@ -540,8 +540,7 @@ export default {
var url =
`${designUrl}/routingheader/GetListSmall?approvalstatus=1&product_id=` +
productid +
"&routingType=" +
this.formValidate.routingType;
"&routingType=0";
service.get(`${url}`).then(response => {
this.RoutingList = response.result;
});
......
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