Commit 6615fc1f authored by 仇晓婷's avatar 仇晓婷

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

parents 7cd863e9 13c49b8f
<template>
<div style="padding: 0;" class="excute">
<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>
<div style="padding: 0;" class="excute">
<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">
<Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" />
<Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "../../aps/api";
import Edit from "./edit";
import Add from "../options";
export default {
name: "list",
components: {
Edit,
Add
},
props: {
rowId: { type: Number }
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "task_seq",
value: null
name: "list",
components: {
Edit,
Add
},
props: {
rowId: {
type: Number
}
},
setParsModal: false,
editModal: false,
detailModal: false,
rowIndex: null,
curId: 0,
gridHeight: 150,
size: "small",
columns: [
{ title: " ", width: 130 },
{
key: "task_seq",
title: this.l("task_seq"),
align: "left",
easy: true,
high: true
},
{
key: "op_task_pk",
title: this.l("op_task_pk"),
align: "left",
high: true,
hide: true
},
{
key: "task_name",
title: this.l("task_name"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "taskseq_des",
title: this.l("task_name"),
align: "left",
easy: true,
high: true
},
{
key: "part_task_pk",
title: this.l("part_task_pk"),
align: "left",
high: true,
hide: true
},
{
key: "put_into_qty",
title: this.l("put_into_qty"),
align: "left",
high: true,
hide: true
},
{
key: "plan_start",
title: this.l("plan_start"),
align: "center",
high: true,
width: 140,
hide: true
},
{
key: "plan_finish",
title: this.l("plan_finish"),
align: "center",
high: true,
width: 140,
hide: true
},
{
key: "first_equip",
title: this.l("first_equip"),
align: "left",
easy: true,
high: true
},
{
key: "setup_time",
title: this.l("setup_time"),
align: "right",
high: true,
type: "outputTime"
},
{
key: "run_time",
title: this.l("run_time"),
align: "right",
high: true,
type: "outputTime"
},
{
key: "outside_time",
title: this.l("outside_time"),
align: "right",
high: true,
type: "outputTime"
},
{
key: "transport_time",
title: this.l("transport_time"),
align: "right",
high: true,
hide: true,
type: "outputTime"
},
{
key: "check_time",
title: this.l("check_time"),
align: "right",
high: true,
hide: true,
type: "outputTime"
},
{
key: "efficiency_value",
title: this.l("efficiency_value"),
align: "right",
high: true
},
{
key: "machine_rule",
title: this.l("machine_rule"),
align: "center",
easy: true,
high: true,
width: 140
},
{
key: "singleout",
title: this.l("singleout"),
align: "left",
high: true,
hide: true
},
{
key: "equip_type",
title: this.l("equip_type"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "first_equip",
title: this.l("first_equip"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "cal_id",
title: this.l("cal_id"),
align: "left",
easy: true,
high: true
},
{
key: "plan_method",
title: this.l("plan_method"),
align: "left",
easy: true,
high: true
},
{
key: "over_time",
title: this.l("over_time"),
align: "left",
easy: true,
high: true
},
{
key: "isdiscrete",
title: this.l("isdiscrete"),
align: "center",
easy: true,
high: 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
},
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "task_seq",
value: null
}
},
setParsModal: false,
editModal: false,
detailModal: false,
rowIndex: null,
curId: 0,
gridHeight: 150,
size: "small",
columns: [{
title: " ",
width: 130
},
{
key: "task_seq",
title: this.l("task_seq"),
align: "left",
easy: true,
high: true
},
{
key: "op_task_pk",
title: this.l("op_task_pk"),
align: "left",
high: true,
hide: true
},
{
key: "task_name",
title: this.l("task_name"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "taskseq_des",
title: this.l("task_name"),
align: "left",
easy: true,
high: true
},
{
key: "part_task_pk",
title: this.l("part_task_pk"),
align: "left",
high: true,
hide: true
},
{
key: "put_into_qty",
title: this.l("put_into_qty"),
align: "left",
high: true,
hide: true
},
{
key: "plan_start",
title: this.l("plan_start"),
align: "center",
high: true,
width: 140,
hide: true
},
{
key: "plan_finish",
title: this.l("plan_finish"),
align: "center",
high: true,
width: 140,
hide: true
},
{
key: "equip_type",
title: this.l("equip_type"),
align: "left",
easy: true,
high: true
},
{
key: "first_equip",
title: this.l("first_equip"),
align: "left",
easy: true,
high: true
},
{
key: "setup_time",
title: this.l("setup_time"),
align: "right",
high: true,
type: "outputTime"
},
{
key: "run_time",
title: this.l("run_time"),
align: "right",
high: true,
type: "outputTime"
},
{
key: "outside_time",
title: this.l("outside_time"),
align: "right",
high: true,
type: "outputTime"
},
{
key: "transport_time",
title: this.l("transport_time"),
align: "right",
high: true,
hide: true,
type: "outputTime"
},
{
key: "check_time",
title: this.l("check_time"),
align: "right",
high: true,
hide: true,
type: "outputTime"
},
{
key: "efficiency_value",
title: this.l("efficiency_value"),
align: "right",
high: true
},
{
key: "machine_rule",
title: this.l("machine_rule"),
align: "center",
easy: true,
high: true,
width: 140
},
{
key: "singleout",
title: this.l("singleout"),
align: "left",
high: true,
hide: true
},
{
key: "equip_type",
title: this.l("equip_type"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "first_equip",
title: this.l("first_equip"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "cal_id",
title: this.l("cal_id"),
align: "left",
easy: true,
high: true
},
{
key: "plan_method",
title: this.l("plan_method"),
align: "left",
easy: true,
high: true
},
{
key: "over_time",
title: this.l("over_time"),
align: "left",
easy: true,
high: true
},
{
key: "isdiscrete",
title: this.l("isdiscrete"),
align: "center",
easy: true,
high: 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",
title: this.l("workshopcode"),
align: "left",
easy: true,
high: true,
hide: true
{
key: "workshopcode",
title: this.l("workshopcode"),
align: "left",
easy: true,
high: 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",
title: this.l("routing_detail_id"),
align: "left",
high: true,
hide: true
//编辑工序start----
edit(row) {
this.editModal = true;
this.rowData = row;
},
{
key: "routing_header_id",
title: this.l("routing_header_id"),
align: "left",
high: true,
hide: true
//编辑工序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);
}
});
},
{
key: "comb_param",
title: this.l("comb_param"),
align: "left",
easy: true,
high: true,
hide: true
addOk() {
this.data1 = [];
this.loadData(this.rowId);
this.setParsModal = false;
this.editModal = false;
},
{
key: "rule_qty",
title: this.l("rule_qty"),
align: "left",
high: true,
hide: true
//删除工序时间end-----
cancel() {
this.curId = 0;
this.setParsModal = false;
this.detailModal = false;
this.editModal = false;
this.deletedlModal = false;
},
{
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;
l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key;
}
});
},
//编辑工序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>
<style lang="less">
.excute table tr th span,
.excute table tr td {
font-size: 10px;
font-size: 10px;
}
</style>
......@@ -211,8 +211,7 @@ export default {
title: this.l("equip_type"),
align: "left",
easy: true,
high: true,
hide: true
high: true
},
{
key: "first_equip",
......
......@@ -2,9 +2,9 @@
@import "../processDesign/Process/menu.less";
</style>
<template>
<div class="new_box">
<div class="new_box">
<Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="160" inline>
<!-- <Row>
<!-- <Row>
<FormItem label="文件模板" prop="file_template">
<Select style="width:240px;" v-model="formValidate.file_template" placeholder="请选择...">
<Option
......@@ -24,475 +24,471 @@
/>
</FormItem>
</Row>-->
<Row>
<Col span="10">
<FormItem label="文档编号" prop="code">
<Input
size="large"
v-model.trim="formValidate.code"
placeholder="请输入..."
style="width:240px"
:disabled="codeisview"
/>
</FormItem>
</Col>
<Col span="10">
<FormItem label="配套完成时间" prop="materialPlanFinishDate">
<DatePicker v-if="codeisview" type="date" v-model="formValidate.materialPlanFinishDate"></DatePicker>
</FormItem>
</Col>
<Col span="4">
<Button v-if="codeisview" type="primary" @click="Savedata()">确定</Button>
</Col>
</Row>
<Row>
<Col span="10">
<FormItem label="文档编号" prop="code">
<Input size="large" v-model.trim="formValidate.code" placeholder="请输入..." style="width:240px" :disabled="codeisview" />
</FormItem>
</Col>
<Col span="10">
<FormItem label="配套完成时间" prop="materialPlanFinishDate">
<DatePicker v-if="codeisview" type="date" v-model="formValidate.materialPlanFinishDate"></DatePicker>
</FormItem>
</Col>
<Col span="4">
<Button v-if="codeisview" type="primary" @click="Savedata()">确定</Button>
</Col>
</Row>
</Form>
<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.material_type"
></state>
</template>
<template slot-scope="{ row,index }" slot="materialType">
<state code="mes_xingchi_resource.material.materialReType" type="text" :value="row.material_type"></state>
</template>
</Table>
<Modal v-model="newModel" title="查看物料项" :mask-closable="false" width="830px">
<Form ref="formprocessValidate" :model="formprocessValidate" :label-width="120" inline>
<Row>
<Col :span="12">
<FormItem :label="l('materialNumber')" prop="materialNumber">
<Input :disabled="true" v-model="formprocessValidate.materialNumber"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('nameMaterial')" prop="nameMaterial">
<Input :disabled="true" v-model="formprocessValidate.name"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('quantity')" prop="quantity">
<InputNumber :disabled="true" v-model="formprocessValidate.quantity"></InputNumber>
</FormItem>
</Col>
<Form ref="formprocessValidate" :model="formprocessValidate" :label-width="120" inline>
<Row>
<Col :span="12">
<FormItem :label="l('materialNumber')" prop="materialNumber">
<Input :disabled="true" v-model="formprocessValidate.materialNumber"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('nameMaterial')" prop="nameMaterial">
<Input :disabled="true" v-model="formprocessValidate.name"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('quantity')" prop="quantity">
<InputNumber :disabled="true" v-model="formprocessValidate.quantity"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('materialType')" prop="materialType">
<Dictionary
:disabled="true"
code="mes_xingchi_resource.material.materialReType"
v-model="formprocessValidate.material_type"
></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('brand')" prop="brand">
<Input :disabled="true" v-model="formprocessValidate.pate_number"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('specifications')" prop="specifications">
<Input :disabled="true" v-model="formprocessValidate.spec"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('xhgg')" prop="xhgg">
<Input :disabled="true" v-model="formprocessValidate.xhgg"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('texture')" prop="texture">
<Input :disabled="true" v-model="formprocessValidate.texture"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('procurementStandards')" prop="procurementStandards">
<Input :disabled="true" v-model="formprocessValidate.procurementStandards"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('qualityGrade')" prop="qualityGrade">
<Input :disabled="true" v-model="formprocessValidate.qualityGrade"></Input>
</FormItem>
</Col>
</Row>
</Form>
<Col :span="12">
<FormItem :label="l('materialType')" prop="materialType">
<Dictionary :disabled="true" code="mes_xingchi_resource.material.materialReType" v-model="formprocessValidate.material_type"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('brand')" prop="brand">
<Input :disabled="true" v-model="formprocessValidate.pate_number"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('specifications')" prop="specifications">
<Input :disabled="true" v-model="formprocessValidate.spec"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('xhgg')" prop="xhgg">
<Input :disabled="true" v-model="formprocessValidate.xhgg"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('texture')" prop="texture">
<Input :disabled="true" v-model="formprocessValidate.texture"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('procurementStandards')" prop="procurementStandards">
<Input :disabled="true" v-model="formprocessValidate.procurementStandards"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('qualityGrade')" prop="qualityGrade">
<Input :disabled="true" v-model="formprocessValidate.qualityGrade"></Input>
</FormItem>
</Col>
</Row>
</Form>
</Modal>
</div>
</div>
</template>
<script>
import service from "@/plugins/request";
export default {
name: "orderSupport",
components: {},
data() {
return {
order_comb_id: 0,
orderids: "",
productingPreparationPeople: "",
taskType: "",
Modeltitle: "料单",
dataTop: [],
isview: false,
codeisview: false,
newModel: false,
approvalStatus: 0,
editindex: -1,
name: "orderSupport",
components: {},
data() {
return {
order_comb_id: 0,
orderids: "",
productingPreparationPeople: "",
taskType: "",
Modeltitle: "料单",
dataTop: [],
isview: false,
codeisview: false,
newModel: false,
approvalStatus: 0,
editindex: -1,
ruleValidate: {
materialPlanFinishDate: [
{ required: true, message: "配套完成时间不能为空", trigger: "blur" }
]
ruleValidate: {
materialPlanFinishDate: [{
required: true,
message: "配套完成时间不能为空",
trigger: "blur"
}]
// name: [
// { required: true, message: '文件名称不能为空', trigger: 'blur' }
// ],
// file_template: [
// { required: true, message: '请选择文件模板', trigger: 'change' }
// ]
/*
gdspec: [
{ required: true, message: '请选择刮刀规格', trigger: 'change' }
],
gdquantity: [
{
required: true,
message: '刮刀数量不能为空',
trigger: 'blur',
type: 'number'
}
],
jbquantity: [
{
required: true,
message: '基板总量不能为空',
trigger: 'blur',
type: 'number'
}
],
fmquantity: [
{
required: true,
message: '预估粉末总量不能为空',
trigger: 'blur',
type: 'number'
}
]*/
},
formValidate: {
id: 0,
code: "",
name: "",
platesnum: 0,
quota_per_board: 0,
file_template: "",
remarks: "",
extend: "",
order_comb_id: 0,
orderids: "",
routingHeaderId: 0,
materialPlanFinishDate: "",
productingPreparationPeople: "",
ordercodes: "",
approvalStatus: 0
},
formValidate1: [],
formprocessValidate: {
id: 0,
materialbillId: 0,
material_type: 0,
name: "",
pate_number: "",
spec: "",
categories: "",
quantity: 1,
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,
supportingID: 0,
materialNumber: "",
xhgg: "",
texture: "",
procurementStandards: "",
qualityGrade: ""
},
column1: [
{ title: "序号", type: "index", width: "70", align: "center" },
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
easy: true,
high: true
},
{
key: "name",
title: this.l("nameMaterial"),
align: "left",
easy: true,
high: true
},
{
key: "quantity",
title: this.l("quantity"),
align: "left",
high: true
},
// name: [
// { required: true, message: '文件名称不能为空', trigger: 'blur' }
// ],
// file_template: [
// { required: true, message: '请选择文件模板', trigger: 'change' }
// ]
/*
gdspec: [
{ required: true, message: '请选择刮刀规格', trigger: 'change' }
],
gdquantity: [
{
required: true,
message: '刮刀数量不能为空',
trigger: 'blur',
type: 'number'
}
],
jbquantity: [
{
required: true,
message: '基板总量不能为空',
trigger: 'blur',
type: 'number'
}
],
fmquantity: [
{
required: true,
message: '预估粉末总量不能为空',
trigger: 'blur',
type: 'number'
}
]*/
},
formValidate: {
id: 0,
code: "",
name: "",
platesnum: 0,
quota_per_board: 0,
file_template: "",
remarks: "",
extend: "",
order_comb_id: 0,
orderids: "",
routingHeaderId: 0,
materialPlanFinishDate: "",
productingPreparationPeople: "",
ordercodes: "",
approvalStatus: 0
},
formValidate1: [],
formprocessValidate: {
id: 0,
materialbillId: 0,
material_type: 0,
name: "",
pate_number: "",
spec: "",
categories: "",
quantity: 1,
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,
supportingID: 0,
materialNumber: "",
xhgg: "",
texture: "",
procurementStandards: "",
qualityGrade: ""
},
column1: [{
title: "序号",
type: "index",
width: "70",
align: "center"
},
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
easy: true,
high: true
},
{
key: "name",
title: this.l("nameMaterial"),
align: "left",
easy: true,
high: true
},
{
key: "quantity",
title: this.l("quantity"),
align: "left",
high: true
},
{
title: "实际数量",
key: "actual_quantity",
align: "center",
render: (h, params) => {
if (this.isview) {
return h("div", this.formValidate1[params.index].actual_quantity);
} else {
return h("div", [
h("InputNumber", {
props: {
value: this.formValidate1[params.index].actual_quantity,
min: 1
},
on: {
"on-change": event => {
this.formValidate1[params.index].actual_quantity = event;
{
title: "实际数量",
key: "actual_quantity",
align: "center",
render: (h, params) => {
if (this.isview) {
return h("div", this.formValidate1[params.index].actual_quantity);
} else {
return h("div", [
h("InputNumber", {
props: {
value: this.formValidate1[params.index].actual_quantity,
min: 1
},
on: {
"on-change": event => {
this.formValidate1[params.index].actual_quantity = event;
}
}
})
]);
}
}
}
})
]);
}
}
},
{
key: "material_type",
title: this.l("materialType"),
align: "left",
easy: true,
high: true,
slot: "materialType"
},
{
key: "pate_number",
title: this.l("brand"),
align: "left",
easy: true,
high: true
},
{
key: "spec",
title: this.l("specifications"),
align: "left",
easy: true,
high: true
},
{
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: "material_type",
title: this.l("materialType"),
align: "left",
easy: true,
high: true,
slot: "materialType"
},
{
key: "pate_number",
title: this.l("brand"),
align: "left",
easy: true,
high: true
},
{
key: "spec",
title: this.l("specifications"),
align: "left",
easy: true,
high: true
},
{
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;
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
});
},
{
key: "procurementStandards",
title: this.l("procurementStandards"),
align: "left"
l(key) {
key = "RoutingSupporting" + "." + key;
return this.$t(key);
},
{
key: "qualityGrade",
title: this.l("qualityGrade"),
align: "left",
easy: true,
high: true
openNew() {
// this.$nextTick(()=>{
// this.$refs['formItem'].resetFields()
// }
this.cleardata1();
this.newModel = true;
},
{
title: "查看",
key: "id",
align: "center",
render: (h, params) => {
let id = params.row.id;
loaddata(orderid) {
var url = `${technologyUrl}/ordermateriallist/getbyorderid?id=` + orderid;
service.get(`${url}`).then(response => {
this.formValidate = response.result.orderMaterial;
return h(
"div",
{
class: "icon_box"
},
[
h("op", {
class: "view ",
attrs: { icon: "ios-eye", title: "查看", type: "icon" },
on: {
click: () => {
this.editFun(params);
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;
}
}
})
]
);
}
}
]
};
},
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() {
this.$refs["formprocessValidate"].validate(v => {
if (v) {
let parmes = {
orderMaterialList: this.formValidate1,
finishDate: this.formValidate.materialPlanFinishDate
};
let url = `${designUrl}/ordersupport/updateordermaterialactualquantity`;
service.put(`${url}`, parmes).then(res => {
if (res.success) {
this.$Message.success("操作成功");
this.$parent.$parent.$refs.grid.reload(
this.$parent.$parent.easySearch
);
}
});
}
});
},
Savedata() {
this.$refs["formprocessValidate"].validate(v => {
if (v) {
let parmes = {
orderMaterialList: this.formValidate1,
finishDate: this.formValidate.materialPlanFinishDate
};
let url = `${technologyUrl}/ordersupport/updateordermaterialactualquantity`;
service.put(`${url}`, parmes).then(res => {
if (res.success) {
this.$Message.success("操作成功");
this.$parent.$parent.$refs.grid.reload(
this.$parent.$parent.easySearch
);
}
});
}
});
},
editFun(params) {
this.editindex = params.index;
this.formprocessValidate.id = params.row.id;
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;
editFun(params) {
this.editindex = params.index;
this.formprocessValidate.id = params.row.id;
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.categories = params.row.categories;
this.formprocessValidate.materialId = params.row.materialId;
this.formprocessValidate.materialNumber = params.row.materialNumber;
this.formprocessValidate.nameMaterial = params.row.nameMaterial;
this.formprocessValidate.brand = params.row.brand;
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.materialNumber = params.row.materialNumber;
this.formprocessValidate.nameMaterial = params.row.nameMaterial;
this.formprocessValidate.brand = params.row.brand;
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.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 =
params.row.procurementStandards;
this.formprocessValidate.qualityGrade = params.row.qualityGrade;
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;
},
this.newModel = true;
},
saveCancelModel() {
this.modalliao = false;
},
cancel() {
this.cleardata1();
this.editindex = -1;
},
cleardata() {
this.formValidate.id = 0;
this.formValidate.code = "";
this.formValidate.name = "";
this.formValidate.platesnum = 0;
this.formValidate.quota_per_board = 0;
this.formValidate.file_template = "";
},
cleardata1() {
this.editindex = -1;
(this.formprocessValidate.id = 0),
(this.formprocessValidate.material_type = 0),
(this.formprocessValidate.name = ""),
(this.formprocessValidate.pate_number = ""),
(this.formprocessValidate.spec = ""),
(this.formprocessValidate.categories = ""),
(this.formprocessValidate.quantity = 1),
(this.formprocessValidate.singlequantity = 0),
(this.formprocessValidate.quantity_unit = ""),
(this.formprocessValidate.estimated_part_height = 0),
(this.formprocessValidate.height_unit = ""),
(this.formprocessValidate.lower_basal_plate = 0),
(this.formprocessValidate.plate_unit = ""),
(this.formprocessValidate.use_equip = ""),
(this.formprocessValidate.remarks = ""),
(this.formprocessValidate.extend = ""),
(this.formprocessValidate.actual_quantity = 0),
(this.formprocessValidate.routingHeaderId = 0),
(this.formprocessValidate.routingDetailId = 0),
(this.formprocessValidate.routingStepId = 0),
(this.formprocessValidate.supportingID = 0),
(this.formprocessValidate.materialNumber = ""),
(this.formprocessValidate.xhgg = ""),
(this.formprocessValidate.exture = ""),
(this.formprocessValidate.procurementStandards = ""),
(this.formprocessValidate.qualityGrade = "");
saveCancelModel() {
this.modalliao = false;
},
cancel() {
this.cleardata1();
this.editindex = -1;
},
cleardata() {
this.formValidate.id = 0;
this.formValidate.code = "";
this.formValidate.name = "";
this.formValidate.platesnum = 0;
this.formValidate.quota_per_board = 0;
this.formValidate.file_template = "";
},
cleardata1() {
this.editindex = -1;
(this.formprocessValidate.id = 0),
(this.formprocessValidate.material_type = 0),
(this.formprocessValidate.name = ""),
(this.formprocessValidate.pate_number = ""),
(this.formprocessValidate.spec = ""),
(this.formprocessValidate.categories = ""),
(this.formprocessValidate.quantity = 1),
(this.formprocessValidate.singlequantity = 0),
(this.formprocessValidate.quantity_unit = ""),
(this.formprocessValidate.estimated_part_height = 0),
(this.formprocessValidate.height_unit = ""),
(this.formprocessValidate.lower_basal_plate = 0),
(this.formprocessValidate.plate_unit = ""),
(this.formprocessValidate.use_equip = ""),
(this.formprocessValidate.remarks = ""),
(this.formprocessValidate.extend = ""),
(this.formprocessValidate.actual_quantity = 0),
(this.formprocessValidate.routingHeaderId = 0),
(this.formprocessValidate.routingDetailId = 0),
(this.formprocessValidate.routingStepId = 0),
(this.formprocessValidate.supportingID = 0),
(this.formprocessValidate.materialNumber = ""),
(this.formprocessValidate.xhgg = ""),
(this.formprocessValidate.exture = ""),
(this.formprocessValidate.procurementStandards = ""),
(this.formprocessValidate.qualityGrade = "");
}
}
}
};
</script>
\ No newline at end of file
</script>
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