Commit d6583fc2 authored by renjintao's avatar renjintao

equip_type

parent c624f999
<template> <template>
<div style="padding: 0;" class="excute"> <div style="padding: 0;" class="excute">
<DataGrid <DataGrid style="margin-top:2px; margin-bottom: -5px;" :columns="columns" ref="grid" :easy="false" :high="false" :set="false" :border="false" :data="data1" :height="gridHeight" :page="false" :size="size"></DataGrid>
style="margin-top:2px; margin-bottom: -5px;"
:columns="columns"
ref="grid"
:easy="false"
:high="false"
:set="false"
:border="false"
:data="data1"
:height="gridHeight"
:page="false"
:size="size"
></DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800"> <Modal v-model="editModal" title="编辑" footer-hide width="800">
<Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" /> <Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "../../aps/api"; import Api from "../../aps/api";
import Edit from "./edit"; import Edit from "./edit";
import Add from "../options"; import Add from "../options";
export default { export default {
name: "list", name: "list",
components: { components: {
Edit, Edit,
Add Add
}, },
props: { props: {
rowId: { type: Number } rowId: {
}, type: Number
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "task_seq",
value: null
} }
}, },
setParsModal: false, data() {
editModal: false, return {
detailModal: false, action: Api.index,
rowIndex: null, easySearch: {
curId: 0, keys: {
gridHeight: 150, op: "task_seq",
size: "small", value: null
columns: [ }
{ title: " ", width: 130 }, },
{ setParsModal: false,
key: "task_seq", editModal: false,
title: this.l("task_seq"), detailModal: false,
align: "left", rowIndex: null,
easy: true, curId: 0,
high: true gridHeight: 150,
}, size: "small",
{ columns: [{
key: "op_task_pk", title: " ",
title: this.l("op_task_pk"), width: 130
align: "left", },
high: true, {
hide: true key: "task_seq",
}, title: this.l("task_seq"),
{ align: "left",
key: "task_name", easy: true,
title: this.l("task_name"), high: true
align: "left", },
easy: true, {
high: true, key: "op_task_pk",
hide: true title: this.l("op_task_pk"),
}, align: "left",
{ high: true,
key: "taskseq_des", hide: true
title: this.l("task_name"), },
align: "left", {
easy: true, key: "task_name",
high: true title: this.l("task_name"),
}, align: "left",
{ easy: true,
key: "part_task_pk", high: true,
title: this.l("part_task_pk"), hide: true
align: "left", },
high: true, {
hide: true key: "taskseq_des",
}, title: this.l("task_name"),
{ align: "left",
key: "put_into_qty", easy: true,
title: this.l("put_into_qty"), high: true
align: "left", },
high: true, {
hide: true key: "part_task_pk",
}, title: this.l("part_task_pk"),
{ align: "left",
key: "plan_start", high: true,
title: this.l("plan_start"), hide: true
align: "center", },
high: true, {
width: 140, key: "put_into_qty",
hide: true title: this.l("put_into_qty"),
}, align: "left",
{ high: true,
key: "plan_finish", hide: true
title: this.l("plan_finish"), },
align: "center", {
high: true, key: "plan_start",
width: 140, title: this.l("plan_start"),
hide: true align: "center",
}, high: true,
{ width: 140,
key: "first_equip", hide: true
title: this.l("first_equip"), },
align: "left", {
easy: true, key: "plan_finish",
high: true title: this.l("plan_finish"),
}, align: "center",
{ high: true,
key: "setup_time", width: 140,
title: this.l("setup_time"), hide: true
align: "right", },
high: true, {
type: "outputTime" key: "equip_type",
}, title: this.l("equip_type"),
{ align: "left",
key: "run_time", easy: true,
title: this.l("run_time"), high: true
align: "right", },
high: true, {
type: "outputTime" key: "first_equip",
}, title: this.l("first_equip"),
{ align: "left",
key: "outside_time", easy: true,
title: this.l("outside_time"), high: true
align: "right", },
high: true, {
type: "outputTime" key: "setup_time",
}, title: this.l("setup_time"),
{ align: "right",
key: "transport_time", high: true,
title: this.l("transport_time"), type: "outputTime"
align: "right", },
high: true, {
hide: true, key: "run_time",
type: "outputTime" title: this.l("run_time"),
}, align: "right",
{ high: true,
key: "check_time", type: "outputTime"
title: this.l("check_time"), },
align: "right", {
high: true, key: "outside_time",
hide: true, title: this.l("outside_time"),
type: "outputTime" align: "right",
}, high: true,
{ type: "outputTime"
key: "efficiency_value", },
title: this.l("efficiency_value"), {
align: "right", key: "transport_time",
high: true title: this.l("transport_time"),
}, align: "right",
{ high: true,
key: "machine_rule", hide: true,
title: this.l("machine_rule"), type: "outputTime"
align: "center", },
easy: true, {
high: true, key: "check_time",
width: 140 title: this.l("check_time"),
}, align: "right",
{ high: true,
key: "singleout", hide: true,
title: this.l("singleout"), type: "outputTime"
align: "left", },
high: true, {
hide: true key: "efficiency_value",
}, title: this.l("efficiency_value"),
{ align: "right",
key: "equip_type", high: true
title: this.l("equip_type"), },
align: "left", {
easy: true, key: "machine_rule",
high: true, title: this.l("machine_rule"),
hide: true align: "center",
}, easy: true,
{ high: true,
key: "first_equip", width: 140
title: this.l("first_equip"), },
align: "left", {
easy: true, key: "singleout",
high: true, title: this.l("singleout"),
hide: true align: "left",
}, high: true,
{ hide: true
key: "cal_id", },
title: this.l("cal_id"), {
align: "left", key: "equip_type",
easy: true, title: this.l("equip_type"),
high: true align: "left",
}, easy: true,
{ high: true,
key: "plan_method", hide: true
title: this.l("plan_method"), },
align: "left", {
easy: true, key: "first_equip",
high: true title: this.l("first_equip"),
}, align: "left",
{ easy: true,
key: "over_time", high: true,
title: this.l("over_time"), hide: true
align: "left", },
easy: true, {
high: true key: "cal_id",
}, title: this.l("cal_id"),
{ align: "left",
key: "isdiscrete", easy: true,
title: this.l("isdiscrete"), high: true
align: "center", },
easy: true, {
high: true key: "plan_method",
}, title: this.l("plan_method"),
{ align: "left",
key: "discrete_value", easy: true,
title: this.l("discrete_value"), high: true
align: "right", },
high: true {
}, key: "over_time",
{ title: this.l("over_time"),
key: "multi_machine", align: "left",
title: this.l("multi_machine"), easy: true,
align: "center", high: true
easy: true, },
high: true {
}, key: "isdiscrete",
{ title: this.l("isdiscrete"),
key: "notes", align: "center",
title: this.l("notes"), easy: true,
align: "left", high: true
easy: true, },
high: true, {
hide: true key: "discrete_value",
}, title: this.l("discrete_value"),
align: "right",
high: true
},
{
key: "multi_machine",
title: this.l("multi_machine"),
align: "center",
easy: true,
high: true
},
{
key: "notes",
title: this.l("notes"),
align: "left",
easy: true,
high: true,
hide: true
},
{ {
key: "workshopcode", key: "workshopcode",
title: this.l("workshopcode"), title: this.l("workshopcode"),
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
},
{
key: "routing_detail_id",
title: this.l("routing_detail_id"),
align: "left",
high: true,
hide: true
},
{
key: "routing_header_id",
title: this.l("routing_header_id"),
align: "left",
high: true,
hide: true
},
{
key: "comb_param",
title: this.l("comb_param"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "rule_qty",
title: this.l("rule_qty"),
align: "left",
high: true,
hide: true
},
{
title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
h("op", {
attrs: {
icon: "md-create",
type: "icon",
title: "編輯工序",
oprate: "edit"
},
on: {
click: () => this.edit(params.row)
}
}),
h("op", {
attrs: {
icon: "ios-trash",
type: "icon",
title: "删除工序",
oprate: "delete",
msg: "确认要刪除工序吗?"
},
on: {
click: () => this.remove(params.row, params.index)
}
})
]);
}
}
],
data1: [],
insertTItle: "插单",
selectRoutingDetail: {}, //需那种工序
//设置参数开始
setParams: {
opTaskPk: 0, //工单ID
partTaskPk: 0, //生产计划ID
taskSeq: "", //工序编号
count: 0 //生产计划数量
},
//设置参数结束
rowData: {} //编辑时传入行数据
};
},
mounted() {
this.loadData(this.rowId);
},
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
//根据点击副组件传过来id进行加载数据
loadData(expendId) {
let params = {
id: expendId
};
Api.getbyorderid(params).then(res => {
if (res.success) {
this.gridHeight = 50;
this.gridHeight = (res.result.length + 1) * 47;
this.data1 = res.result;
}
});
}, },
{
key: "routing_detail_id", //编辑工序start----
title: this.l("routing_detail_id"), edit(row) {
align: "left", this.editModal = true;
high: true, this.rowData = row;
hide: true
}, },
{ //编辑工序end----
key: "routing_header_id",
title: this.l("routing_header_id"), //删除工序事件start-----
align: "left", remove(row, index) {
high: true, //this.curId = Number(id);
hide: true this.rowIndex = index;
this.selectRoutingDetail = row;
let params = {
partPk: this.selectRoutingDetail.part_task_pk,
detailIdstr: this.selectRoutingDetail.routing_detail_id
};
Api.removeoptasksimluate(params).then(r => {
if (r.success) {
this.$Message.success("删除成功");
this.data1.splice(this.rowIndex, 1);
}
});
}, },
{ addOk() {
key: "comb_param", this.data1 = [];
title: this.l("comb_param"), this.loadData(this.rowId);
align: "left", this.setParsModal = false;
easy: true, this.editModal = false;
high: true,
hide: true
}, },
{ //删除工序时间end-----
key: "rule_qty", cancel() {
title: this.l("rule_qty"), this.curId = 0;
align: "left", this.setParsModal = false;
high: true, this.detailModal = false;
hide: true this.editModal = false;
this.deletedlModal = false;
}, },
{ l(key) {
title: "操作", let vkey = "mes_op_task_plan_simulate" + "." + key;
key: "action", return this.$t(vkey) || key;
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h("op", {
attrs: {
icon: "md-create",
type: "icon",
title: "編輯工序",
oprate: "edit"
},
on: { click: () => this.edit(params.row) }
}),
h("op", {
attrs: {
icon: "ios-trash",
type: "icon",
title: "删除工序",
oprate: "delete",
msg: "确认要刪除工序吗?"
},
on: { click: () => this.remove(params.row, params.index) }
})
]);
}
}
],
data1: [],
insertTItle: "插单",
selectRoutingDetail: {}, //需那种工序
//设置参数开始
setParams: {
opTaskPk: 0, //工单ID
partTaskPk: 0, //生产计划ID
taskSeq: "", //工序编号
count: 0 //生产计划数量
},
//设置参数结束
rowData: {} //编辑时传入行数据
};
},
mounted() {
this.loadData(this.rowId);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
//根据点击副组件传过来id进行加载数据
loadData(expendId) {
let params = {
id: expendId
};
Api.getbyorderid(params).then(res => {
if (res.success) {
this.gridHeight = 50;
this.gridHeight = (res.result.length + 1) * 47;
this.data1 = res.result;
} }
});
},
//编辑工序start----
edit(row) {
this.editModal = true;
this.rowData = row;
},
//编辑工序end----
//删除工序事件start-----
remove(row, index) {
//this.curId = Number(id);
this.rowIndex = index;
this.selectRoutingDetail = row;
let params = {
partPk: this.selectRoutingDetail.part_task_pk,
detailIdstr: this.selectRoutingDetail.routing_detail_id
};
Api.removeoptasksimluate(params).then(r => {
if (r.success) {
this.$Message.success("删除成功");
this.data1.splice(this.rowIndex, 1);
}
});
},
addOk() {
this.data1 = [];
this.loadData(this.rowId);
this.setParsModal = false;
this.editModal = false;
},
//删除工序时间end-----
cancel() {
this.curId = 0;
this.setParsModal = false;
this.detailModal = false;
this.editModal = false;
this.deletedlModal = false;
},
l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key;
} }
}
}; };
</script> </script>
<style lang="less"> <style lang="less">
.excute table tr th span, .excute table tr th span,
.excute table tr td { .excute table tr td {
font-size: 10px; font-size: 10px;
} }
</style> </style>
...@@ -211,8 +211,7 @@ export default { ...@@ -211,8 +211,7 @@ export default {
title: this.l("equip_type"), title: this.l("equip_type"),
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true
hide: true
}, },
{ {
key: "first_equip", key: "first_equip",
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
@import "../processDesign/Process/menu.less"; @import "../processDesign/Process/menu.less";
</style> </style>
<template> <template>
<div class="new_box"> <div class="new_box">
<Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="160" inline> <Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="160" inline>
<!-- <Row> <!-- <Row>
<FormItem label="文件模板" prop="file_template"> <FormItem label="文件模板" prop="file_template">
<Select style="width:240px;" v-model="formValidate.file_template" placeholder="请选择..."> <Select style="width:240px;" v-model="formValidate.file_template" placeholder="请选择...">
<Option <Option
...@@ -24,475 +24,471 @@ ...@@ -24,475 +24,471 @@
/> />
</FormItem> </FormItem>
</Row>--> </Row>-->
<Row> <Row>
<Col span="10"> <Col span="10">
<FormItem label="文档编号" prop="code"> <FormItem label="文档编号" prop="code">
<Input <Input size="large" v-model.trim="formValidate.code" placeholder="请输入..." style="width:240px" :disabled="codeisview" />
size="large" </FormItem>
v-model.trim="formValidate.code" </Col>
placeholder="请输入..." <Col span="10">
style="width:240px" <FormItem label="配套完成时间" prop="materialPlanFinishDate">
:disabled="codeisview" <DatePicker v-if="codeisview" type="date" v-model="formValidate.materialPlanFinishDate"></DatePicker>
/> </FormItem>
</FormItem> </Col>
</Col> <Col span="4">
<Col span="10"> <Button v-if="codeisview" type="primary" @click="Savedata()">确定</Button>
<FormItem label="配套完成时间" prop="materialPlanFinishDate"> </Col>
<DatePicker v-if="codeisview" type="date" v-model="formValidate.materialPlanFinishDate"></DatePicker> </Row>
</FormItem>
</Col>
<Col span="4">
<Button v-if="codeisview" type="primary" @click="Savedata()">确定</Button>
</Col>
</Row>
</Form> </Form>
<Table stripe ref="table" border :columns="column1" :data="formValidate1" class="tableCommon"> <Table stripe ref="table" border :columns="column1" :data="formValidate1" class="tableCommon">
<template slot-scope="{ row,index }" slot="materialType"> <template slot-scope="{ row,index }" slot="materialType">
<state <state code="mes_xingchi_resource.material.materialReType" type="text" :value="row.material_type"></state>
code="mes_xingchi_resource.material.materialReType" </template>
type="text"
:value="row.material_type"
></state>
</template>
</Table> </Table>
<Modal v-model="newModel" title="查看物料项" :mask-closable="false" width="830px"> <Modal v-model="newModel" title="查看物料项" :mask-closable="false" width="830px">
<Form ref="formprocessValidate" :model="formprocessValidate" :label-width="120" inline> <Form 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">
<Input :disabled="true" v-model="formprocessValidate.materialNumber"></Input> <Input :disabled="true" v-model="formprocessValidate.materialNumber"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('nameMaterial')" prop="nameMaterial"> <FormItem :label="l('nameMaterial')" prop="nameMaterial">
<Input :disabled="true" v-model="formprocessValidate.name"></Input> <Input :disabled="true" v-model="formprocessValidate.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('quantity')" prop="quantity"> <FormItem :label="l('quantity')" prop="quantity">
<InputNumber :disabled="true" v-model="formprocessValidate.quantity"></InputNumber> <InputNumber :disabled="true" v-model="formprocessValidate.quantity"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('materialType')" prop="materialType"> <FormItem :label="l('materialType')" prop="materialType">
<Dictionary <Dictionary :disabled="true" code="mes_xingchi_resource.material.materialReType" v-model="formprocessValidate.material_type"></Dictionary>
:disabled="true" </FormItem>
code="mes_xingchi_resource.material.materialReType" </Col>
v-model="formprocessValidate.material_type" <Col :span="12">
></Dictionary> <FormItem :label="l('brand')" prop="brand">
</FormItem> <Input :disabled="true" v-model="formprocessValidate.pate_number"></Input>
</Col> </FormItem>
<Col :span="12"> </Col>
<FormItem :label="l('brand')" prop="brand"> <Col :span="12">
<Input :disabled="true" v-model="formprocessValidate.pate_number"></Input> <FormItem :label="l('specifications')" prop="specifications">
</FormItem> <Input :disabled="true" v-model="formprocessValidate.spec"></Input>
</Col> </FormItem>
<Col :span="12"> </Col>
<FormItem :label="l('specifications')" prop="specifications"> <Col :span="12">
<Input :disabled="true" v-model="formprocessValidate.spec"></Input> <FormItem :label="l('xhgg')" prop="xhgg">
</FormItem> <Input :disabled="true" v-model="formprocessValidate.xhgg"></Input>
</Col> </FormItem>
<Col :span="12"> </Col>
<FormItem :label="l('xhgg')" prop="xhgg"> <Col :span="12">
<Input :disabled="true" v-model="formprocessValidate.xhgg"></Input> <FormItem :label="l('texture')" prop="texture">
</FormItem> <Input :disabled="true" v-model="formprocessValidate.texture"></Input>
</Col> </FormItem>
<Col :span="12"> </Col>
<FormItem :label="l('texture')" prop="texture"> <Col :span="12">
<Input :disabled="true" v-model="formprocessValidate.texture"></Input> <FormItem :label="l('procurementStandards')" prop="procurementStandards">
</FormItem> <Input :disabled="true" v-model="formprocessValidate.procurementStandards"></Input>
</Col> </FormItem>
<Col :span="12"> </Col>
<FormItem :label="l('procurementStandards')" prop="procurementStandards"> <Col :span="12">
<Input :disabled="true" v-model="formprocessValidate.procurementStandards"></Input> <FormItem :label="l('qualityGrade')" prop="qualityGrade">
</FormItem> <Input :disabled="true" v-model="formprocessValidate.qualityGrade"></Input>
</Col> </FormItem>
<Col :span="12"> </Col>
<FormItem :label="l('qualityGrade')" prop="qualityGrade"> </Row>
<Input :disabled="true" v-model="formprocessValidate.qualityGrade"></Input> </Form>
</FormItem>
</Col>
</Row>
</Form>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import service from "@/plugins/request"; import service from "@/plugins/request";
export default { export default {
name: "orderSupport", name: "orderSupport",
components: {}, components: {},
data() { data() {
return { return {
order_comb_id: 0, order_comb_id: 0,
orderids: "", orderids: "",
productingPreparationPeople: "", productingPreparationPeople: "",
taskType: "", taskType: "",
Modeltitle: "料单", Modeltitle: "料单",
dataTop: [], dataTop: [],
isview: false, isview: false,
codeisview: false, codeisview: false,
newModel: false, newModel: false,
approvalStatus: 0, approvalStatus: 0,
editindex: -1, editindex: -1,
ruleValidate: { ruleValidate: {
materialPlanFinishDate: [ materialPlanFinishDate: [{
{ required: true, message: "配套完成时间不能为空", trigger: "blur" } required: true,
] message: "配套完成时间不能为空",
trigger: "blur"
}]
// name: [ // name: [
// { required: true, message: '文件名称不能为空', trigger: 'blur' } // { required: true, message: '文件名称不能为空', trigger: 'blur' }
// ], // ],
// file_template: [ // file_template: [
// { required: true, message: '请选择文件模板', trigger: 'change' } // { required: true, message: '请选择文件模板', trigger: 'change' }
// ] // ]
/* /*
gdspec: [ gdspec: [
{ required: true, message: '请选择刮刀规格', trigger: 'change' } { required: true, message: '请选择刮刀规格', trigger: 'change' }
], ],
gdquantity: [ gdquantity: [
{ {
required: true, required: true,
message: '刮刀数量不能为空', message: '刮刀数量不能为空',
trigger: 'blur', trigger: 'blur',
type: 'number' type: 'number'
} }
], ],
jbquantity: [ jbquantity: [
{ {
required: true, required: true,
message: '基板总量不能为空', message: '基板总量不能为空',
trigger: 'blur', trigger: 'blur',
type: 'number' type: 'number'
} }
], ],
fmquantity: [ fmquantity: [
{ {
required: true, required: true,
message: '预估粉末总量不能为空', message: '预估粉末总量不能为空',
trigger: 'blur', trigger: 'blur',
type: 'number' type: 'number'
} }
]*/ ]*/
}, },
formValidate: { formValidate: {
id: 0, id: 0,
code: "", code: "",
name: "", name: "",
platesnum: 0, platesnum: 0,
quota_per_board: 0, quota_per_board: 0,
file_template: "", file_template: "",
remarks: "", remarks: "",
extend: "", extend: "",
order_comb_id: 0, order_comb_id: 0,
orderids: "", orderids: "",
routingHeaderId: 0, routingHeaderId: 0,
materialPlanFinishDate: "", materialPlanFinishDate: "",
productingPreparationPeople: "", productingPreparationPeople: "",
ordercodes: "", ordercodes: "",
approvalStatus: 0 approvalStatus: 0
}, },
formValidate1: [], formValidate1: [],
formprocessValidate: { formprocessValidate: {
id: 0, id: 0,
materialbillId: 0, materialbillId: 0,
material_type: 0, material_type: 0,
name: "", name: "",
pate_number: "", pate_number: "",
spec: "", spec: "",
categories: "", categories: "",
quantity: 1, quantity: 1,
singlequantity: 0, singlequantity: 0,
quantity_unit: "", quantity_unit: "",
estimated_part_height: 0, estimated_part_height: 0,
height_unit: "", height_unit: "",
lower_basal_plate: 0, lower_basal_plate: 0,
plate_unit: "", plate_unit: "",
use_equip: "", use_equip: "",
remarks: "", remarks: "",
extend: "", extend: "",
actual_quantity: 0, actual_quantity: 0,
routingHeaderId: 0, routingHeaderId: 0,
routingDetailId: 0, routingDetailId: 0,
routingStepId: 0, routingStepId: 0,
supportingID: 0, supportingID: 0,
materialNumber: "", materialNumber: "",
xhgg: "", xhgg: "",
texture: "", texture: "",
procurementStandards: "", procurementStandards: "",
qualityGrade: "" qualityGrade: ""
}, },
column1: [ column1: [{
{ title: "序号", type: "index", width: "70", align: "center" }, title: "序号",
{ type: "index",
key: "materialNumber", width: "70",
title: this.l("materialNumber"), align: "center"
align: "left", },
easy: true, {
high: true key: "materialNumber",
}, title: this.l("materialNumber"),
{ align: "left",
key: "name", easy: true,
title: this.l("nameMaterial"), high: true
align: "left", },
easy: true, {
high: true key: "name",
}, title: this.l("nameMaterial"),
{ align: "left",
key: "quantity", easy: true,
title: this.l("quantity"), high: true
align: "left", },
high: true {
}, key: "quantity",
title: this.l("quantity"),
align: "left",
high: true
},
{ {
title: "实际数量", title: "实际数量",
key: "actual_quantity", key: "actual_quantity",
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
if (this.isview) { if (this.isview) {
return h("div", this.formValidate1[params.index].actual_quantity); return h("div", this.formValidate1[params.index].actual_quantity);
} else { } else {
return h("div", [ return h("div", [
h("InputNumber", { h("InputNumber", {
props: { props: {
value: this.formValidate1[params.index].actual_quantity, value: this.formValidate1[params.index].actual_quantity,
min: 1 min: 1
}, },
on: { on: {
"on-change": event => { "on-change": event => {
this.formValidate1[params.index].actual_quantity = event; this.formValidate1[params.index].actual_quantity = event;
}
}
})
]);
}
} }
} },
}) {
]); key: "material_type",
} title: this.l("materialType"),
} align: "left",
}, easy: true,
{ high: true,
key: "material_type", slot: "materialType"
title: this.l("materialType"), },
align: "left", {
easy: true, key: "pate_number",
high: true, title: this.l("brand"),
slot: "materialType" align: "left",
}, easy: true,
{ high: true
key: "pate_number", },
title: this.l("brand"), {
align: "left", key: "spec",
easy: true, title: this.l("specifications"),
high: true align: "left",
}, easy: true,
{ high: true
key: "spec", },
title: this.l("specifications"), {
align: "left", key: "xhgg",
easy: true, title: this.l("xhgg"),
high: true align: "left",
}, easy: true,
{ high: true
key: "xhgg", },
title: this.l("xhgg"), {
align: "left", key: "texture",
easy: true, title: this.l("texture"),
high: true align: "left",
}, easy: true,
{ high: true
key: "texture", },
title: this.l("texture"), {
align: "left", key: "procurementStandards",
easy: true, title: this.l("procurementStandards"),
high: true 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;
return h(
"div", {
class: "icon_box"
},
[
h("op", {
class: "view ",
attrs: {
icon: "ios-eye",
title: "查看",
type: "icon"
},
on: {
click: () => {
this.editFun(params);
}
}
})
]
);
}
}
]
};
},
mounted() {},
created: function () {},
methods: {
handleCreate1(val) {
this.EquipList.push({
value: val,
label: val
});
}, },
{ l(key) {
key: "procurementStandards", key = "RoutingSupporting" + "." + key;
title: this.l("procurementStandards"), return this.$t(key);
align: "left"
}, },
{ openNew() {
key: "qualityGrade", // this.$nextTick(()=>{
title: this.l("qualityGrade"), // this.$refs['formItem'].resetFields()
align: "left", // }
easy: true, this.cleardata1();
high: true this.newModel = true;
}, },
{ loaddata(orderid) {
title: "查看", var url = `${technologyUrl}/ordermateriallist/getbyorderid?id=` + orderid;
key: "id", service.get(`${url}`).then(response => {
align: "center", this.formValidate = response.result.orderMaterial;
render: (h, params) => {
let id = params.row.id;
return h( this.codeisview = true;
"div", this.formValidate1 = response.result.orderMaterialList;
{ if (this.formValidate.status == 1) {
class: "icon_box" for (let i = 0; i < this.formValidate1.length; i++) {
}, let obj = this.formValidate1[i];
[ obj.actual_quantity = obj.quantity;
h("op", {
class: "view ",
attrs: { icon: "ios-eye", title: "查看", type: "icon" },
on: {
click: () => {
this.editFun(params);
} }
} }
}) });
] },
);
}
}
]
};
},
mounted() {},
created: function() {},
methods: {
handleCreate1(val) {
this.EquipList.push({
value: val,
label: val
});
},
l(key) {
key = "RoutingSupporting" + "." + key;
return this.$t(key);
},
openNew() {
// this.$nextTick(()=>{
// this.$refs['formItem'].resetFields()
// }
this.cleardata1();
this.newModel = true;
},
loaddata(orderid) {
var url = `${designUrl}/ordermateriallist/getbyorderid?id=` + orderid;
service.get(`${url}`).then(response => {
this.formValidate = response.result.orderMaterial;
this.codeisview = true;
this.formValidate1 = response.result.orderMaterialList;
if (this.formValidate.status == 1) {
for (let i = 0; i < this.formValidate1.length; i++) {
let obj = this.formValidate1[i];
obj.actual_quantity = obj.quantity;
}
}
});
},
Savedata() { Savedata() {
this.$refs["formprocessValidate"].validate(v => { this.$refs["formprocessValidate"].validate(v => {
if (v) { if (v) {
let parmes = { let parmes = {
orderMaterialList: this.formValidate1, orderMaterialList: this.formValidate1,
finishDate: this.formValidate.materialPlanFinishDate finishDate: this.formValidate.materialPlanFinishDate
}; };
let url = `${designUrl}/ordersupport/updateordermaterialactualquantity`; let url = `${technologyUrl}/ordersupport/updateordermaterialactualquantity`;
service.put(`${url}`, parmes).then(res => { service.put(`${url}`, parmes).then(res => {
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
this.$parent.$parent.$refs.grid.reload( this.$parent.$parent.$refs.grid.reload(
this.$parent.$parent.easySearch this.$parent.$parent.easySearch
); );
} }
}); });
} }
}); });
}, },
editFun(params) { editFun(params) {
this.editindex = params.index; this.editindex = params.index;
this.formprocessValidate.id = params.row.id; this.formprocessValidate.id = params.row.id;
this.formprocessValidate.materialbillId = params.row.materialbillId; this.formprocessValidate.materialbillId = params.row.materialbillId;
this.formprocessValidate.material_type = params.row.material_type; this.formprocessValidate.material_type = params.row.material_type;
this.formprocessValidate.name = params.row.name; this.formprocessValidate.name = params.row.name;
this.formprocessValidate.spec = params.row.spec; this.formprocessValidate.spec = params.row.spec;
this.formprocessValidate.pate_number = params.row.pate_number; this.formprocessValidate.pate_number = params.row.pate_number;
this.formprocessValidate.categories = params.row.categories; this.formprocessValidate.categories = params.row.categories;
this.formprocessValidate.materialId = params.row.materialId; this.formprocessValidate.materialId = params.row.materialId;
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.quantity = params.row.quantity; this.formprocessValidate.quantity = params.row.quantity;
this.formprocessValidate.singlequantity = params.row.singlequantity; this.formprocessValidate.singlequantity = params.row.singlequantity;
this.formprocessValidate.quantity_unit = params.row.quantity_unit; this.formprocessValidate.quantity_unit = params.row.quantity_unit;
this.formprocessValidate.estimated_part_height = this.formprocessValidate.estimated_part_height =
params.row.estimated_part_height; params.row.estimated_part_height;
this.formprocessValidate.height_unit = params.row.height_unit; this.formprocessValidate.height_unit = params.row.height_unit;
this.formprocessValidate.lower_basal_plate = params.row.lower_basal_plate; this.formprocessValidate.lower_basal_plate = params.row.lower_basal_plate;
this.formprocessValidate.plate_unit = params.row.plate_unit; this.formprocessValidate.plate_unit = params.row.plate_unit;
this.formprocessValidate.use_equip = params.row.use_equip; this.formprocessValidate.use_equip = params.row.use_equip;
this.formprocessValidate.remarks = params.row.remarks; this.formprocessValidate.remarks = params.row.remarks;
this.formprocessValidate.extend = params.row.extend; this.formprocessValidate.extend = params.row.extend;
this.formprocessValidate.actual_quantity = params.row.actual_quantity; this.formprocessValidate.actual_quantity = params.row.actual_quantity;
this.formprocessValidate.routingHeaderId = params.row.routingHeaderId; this.formprocessValidate.routingHeaderId = params.row.routingHeaderId;
this.formprocessValidate.routingDetailId = params.row.routingDetailId; this.formprocessValidate.routingDetailId = params.row.routingDetailId;
this.formprocessValidate.routingStepId = params.row.routingStepId; this.formprocessValidate.routingStepId = params.row.routingStepId;
this.formprocessValidate.supportingID = params.row.supportingID; 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 =
params.row.procurementStandards; params.row.procurementStandards;
this.formprocessValidate.qualityGrade = params.row.qualityGrade; this.formprocessValidate.qualityGrade = params.row.qualityGrade;
this.newModel = true; this.newModel = true;
}, },
saveCancelModel() { saveCancelModel() {
this.modalliao = false; this.modalliao = false;
}, },
cancel() { cancel() {
this.cleardata1(); this.cleardata1();
this.editindex = -1; this.editindex = -1;
}, },
cleardata() { cleardata() {
this.formValidate.id = 0; this.formValidate.id = 0;
this.formValidate.code = ""; this.formValidate.code = "";
this.formValidate.name = ""; this.formValidate.name = "";
this.formValidate.platesnum = 0; this.formValidate.platesnum = 0;
this.formValidate.quota_per_board = 0; this.formValidate.quota_per_board = 0;
this.formValidate.file_template = ""; this.formValidate.file_template = "";
}, },
cleardata1() { cleardata1() {
this.editindex = -1; this.editindex = -1;
(this.formprocessValidate.id = 0), (this.formprocessValidate.id = 0),
(this.formprocessValidate.material_type = 0), (this.formprocessValidate.material_type = 0),
(this.formprocessValidate.name = ""), (this.formprocessValidate.name = ""),
(this.formprocessValidate.pate_number = ""), (this.formprocessValidate.pate_number = ""),
(this.formprocessValidate.spec = ""), (this.formprocessValidate.spec = ""),
(this.formprocessValidate.categories = ""), (this.formprocessValidate.categories = ""),
(this.formprocessValidate.quantity = 1), (this.formprocessValidate.quantity = 1),
(this.formprocessValidate.singlequantity = 0), (this.formprocessValidate.singlequantity = 0),
(this.formprocessValidate.quantity_unit = ""), (this.formprocessValidate.quantity_unit = ""),
(this.formprocessValidate.estimated_part_height = 0), (this.formprocessValidate.estimated_part_height = 0),
(this.formprocessValidate.height_unit = ""), (this.formprocessValidate.height_unit = ""),
(this.formprocessValidate.lower_basal_plate = 0), (this.formprocessValidate.lower_basal_plate = 0),
(this.formprocessValidate.plate_unit = ""), (this.formprocessValidate.plate_unit = ""),
(this.formprocessValidate.use_equip = ""), (this.formprocessValidate.use_equip = ""),
(this.formprocessValidate.remarks = ""), (this.formprocessValidate.remarks = ""),
(this.formprocessValidate.extend = ""), (this.formprocessValidate.extend = ""),
(this.formprocessValidate.actual_quantity = 0), (this.formprocessValidate.actual_quantity = 0),
(this.formprocessValidate.routingHeaderId = 0), (this.formprocessValidate.routingHeaderId = 0),
(this.formprocessValidate.routingDetailId = 0), (this.formprocessValidate.routingDetailId = 0),
(this.formprocessValidate.routingStepId = 0), (this.formprocessValidate.routingStepId = 0),
(this.formprocessValidate.supportingID = 0), (this.formprocessValidate.supportingID = 0),
(this.formprocessValidate.materialNumber = ""), (this.formprocessValidate.materialNumber = ""),
(this.formprocessValidate.xhgg = ""), (this.formprocessValidate.xhgg = ""),
(this.formprocessValidate.exture = ""), (this.formprocessValidate.exture = ""),
(this.formprocessValidate.procurementStandards = ""), (this.formprocessValidate.procurementStandards = ""),
(this.formprocessValidate.qualityGrade = ""); (this.formprocessValidate.qualityGrade = "");
}
} }
}
}; };
</script> </script>
\ No newline at end of file
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