Commit 64b7d882 authored by 全洪江's avatar 全洪江

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-ui into dev

parents 9daf36bf edec9dee
......@@ -4,6 +4,7 @@
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';
@import './page-form.scss';
body {
height: 100%;
......
.page-form.el-form--inline {
.el-form-item {
display: flex;
.el-form-item__content {
flex: 1;
.el-date-editor {
width: 100%;
}
}
}
}
<template>
<el-tooltip :content="tip || title">
<div class="form-label-tip">{{ title }}</div>
</el-tooltip>
</template>
<script>
export default {
props: {
title: String,
tip: String,
},
data() {
return {};
}
};
</script>
<style scoped>
.form-label-tip {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
......@@ -21,6 +21,7 @@ import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, formatMoney } from "@/utils/ruoyi";
import TipLabel from '@/components/TipLabel/index.vue'
import PageTitle from '@/components/Page/PageTitle.vue'
import PageWrapper from '@/components/Page/PageWrapper.vue'
// 分页组件
......@@ -75,6 +76,7 @@ Vue.component('SapPropertyData', SapPropertyData)
Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
Vue.component('TipLabel', TipLabel)
Vue.use(directive)
Vue.use(plugins)
......
......@@ -146,9 +146,9 @@ export default {
};
},
computed: {
title () {
return '设置' + this.process.itemName + '物料'
}
title() {
return "设置" + this.process.itemName + "物料";
},
},
watch: {
process: {
......@@ -216,7 +216,9 @@ export default {
},
/** 提交编辑关联信息 */
submitEditConnect() {
this.tableData.splice(this.currentRowIdx, 1, this.form);
this.tableData.splice(this.currentRowIdx, 1, {
...this.form,
});
this.editConnectVisible = false;
},
},
......
......@@ -298,10 +298,10 @@ export default {
let thisObj = this;
this.$refs["form"].validate((valid) => {
if (valid) {
if (thisObj.optType == "add") {
if (thisObj.optType == 'add') {
thisObj.tableData.unshift({ ...thisObj.form });
} else {
thisObj.tableData.splice(thisObj.currentRowIdx, 1, thisObj.form);
thisObj.tableData.splice(thisObj.currentRowIdx, 1, thisObj.form)
}
thisObj.showFlag = false;
}
......
......@@ -8,9 +8,15 @@
prop="linkType"
align="center"
/>
<el-table-column label="工作站" prop="workstationId" align="center" />
<el-table-column label="工作站" prop="workstationName" align="center" />
<el-table-column label="标准工时" prop="stdWorkingTime" align="center" />
<el-table-column label="甘特图显示颜色" prop="colorCode" align="center" />
<el-table-column v-if="mode != 'info'" label="操作" align="center" width="150">
<el-table-column
v-if="mode != 'info'"
label="操作"
align="center"
width="150"
>
<template slot-scope="{ row, $index }">
<el-button
type="text"
......@@ -42,7 +48,7 @@
v-dialogDrag
:visible.sync="showFlag"
width="800px"
title="添加工序"
title="工序修改"
>
<el-form
ref="form"
......@@ -54,75 +60,31 @@
>
<el-row>
<el-col :span="12">
<el-form-item label="组件数量" prop="quantity">
<el-input
type="number"
v-model="form.quantity"
placeholder="请输入组件数量"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计量单位" prop="unitOfMeasure">
<el-input
v-model="form.unitOfMeasure"
placeholder="请输入计量单位"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报废百分比" prop="scrapPercentage">
<el-input
v-model="form.scrapPercentage"
placeholder="请输入报废百分比"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="替代组" prop="alternativeGroup">
<el-input
v-model="form.alternativeGroup"
placeholder="请输入替代组"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="替代优先级" prop="alternativePriorities">
<el-input
v-model="form.alternativePriorities"
placeholder="请输入替代优先级"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="策略" prop="alternativeStrategy">
<el-input
v-model="form.alternativeStrategy"
placeholder="请输入策略"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="使用概率" prop="alternativeProbability">
<el-form-item label="工作站" prop="workstationId">
<el-input
v-model="form.alternativeProbability"
placeholder="请输入使用概率"
></el-input>
v-model="form.workstationName"
disabled
placeholder="请选择工作站信息"
>
<el-button
slot="append"
icon="el-icon-search"
@click="handleWorkstationSelect"
></el-button>
</el-input>
<WorkstationSelect
ref="WorkstationSelect"
:processId="form.processId"
@onSelected="onWorkstationSelected"
></WorkstationSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="BOM行备注" prop="bomItemRemark">
<el-form-item label="标准工时" prop="stdWorkingTime">
<el-input
v-model="form.bomItemRemark"
placeholder="请输入BOM行备注"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料备注" prop="itemRemark">
<el-input
v-model="form.itemRemark"
placeholder="请输入物料备注"
type="number"
v-model="form.stdWorkingTime"
placeholder="请输入标准工时"
></el-input>
</el-form-item>
</el-col>
......@@ -139,9 +101,10 @@
<script>
import ItemBomSelect from "@/components/itemBomSelect/single.vue";
import ProcessProd from "./ProcessProd.vue";
import WorkstationSelect from "@/components/workstationSelect/simpletableSingle.vue";
export default {
components: { ItemBomSelect, ProcessProd },
inject: ['mode'],
components: { ItemBomSelect, ProcessProd, WorkstationSelect },
inject: ["mode"],
props: {
bomList: {
type: Array,
......@@ -158,15 +121,9 @@ export default {
rules: {},
/**表单初始化数据 */
form: {
quantity: "",
unitOfMeasure: "",
scrapPercentage: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
stdWorkingTime: "",
workstationId: "",
workstationName: "",
},
currentRow: {},
currentRowIndex: undefined,
......@@ -174,9 +131,9 @@ export default {
},
methods: {
setList(rows) {
this.tableData = rows.map(item => {
item.processItemList = []
return item
this.tableData = rows.map((item) => {
item.processItemList = [];
return item;
});
},
/** 更新工序的物料信息 */
......@@ -199,6 +156,10 @@ export default {
this.$refs["form"].validate((valid) => {
if (valid) {
this.showFlag = false;
this.tableData.splice(this.currentRowIndex, 1, {
...this.currentRow,
...this.form,
});
}
});
},
......@@ -208,22 +169,27 @@ export default {
/**重置表单 */
resetForm() {
this.form = {
quantity: "",
unitOfMeasure: "",
scrapPercentage: "",
alternativeGroup: "",
alternativePriorities: "",
alternativeStrategy: "",
alternativeProbability: "",
bomItemRemark: "",
itemRemark: "",
stdWorkingTime: "",
workstationId: "",
workstationName: "",
};
},
/**重置组件状态 */
resetState() {
this.resetForm()
this.tableData = []
}
this.resetForm();
this.tableData = [];
},
// 查询工作站信息
handleWorkstationSelect() {
this.$refs.WorkstationSelect.showFlag = true;
},
onWorkstationSelected(row) {
if (row != undefined && row != null) {
this.form.workstationId = row.workstationId;
this.form.workstationName = row.workstationName;
this.form.stdWorkingTime = row.stdWorkingTime;
}
},
},
};
</script>
......
......@@ -32,17 +32,6 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['mes:pro:productionMake:add']"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
......@@ -169,15 +158,6 @@
v-hasPermi="['mes:pro:productionMake:remove']"
>删除</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-circle-check"
v-if="scope.row.productionMakeStatus == 1"
@click="handleStartMake(scope.row)"
v-hasPermi="['mes:pro:productionMake:update']"
>开始制作</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -247,12 +227,12 @@ export default {
productionMakeStatus: null,
},
options: [
{ value: "审批中", label: "审批中" },
{ value: "待制作", label: "待制作" },
{ value: "制造中", label: "制造中" },
{ value: "待质检", label: "待质检" },
{ value: "待确认", label: "待确认" },
{ value: "已完成", label: "已完成" },
{ value: "0", label: "待检查" },
{ value: "1", label: "待制作" },
{ value: "2", label: "制造中" },
{ value: "3", label: "待质检" },
{ value: "4", label: "待确认" },
{ value: "5", label: "已完成" },
],
// 表单参数
......
......@@ -287,6 +287,7 @@ export default {
const processList = this.$refs.ProogingProcessRef.getComData();
const params = {
...this.form,
'productionRequestId':this.$route.query.productionRequestId,
bomList,
processList,
};
......
......@@ -487,15 +487,15 @@
return '否';
}
},
},
// 生成制作单
generate(row) {
// 跳转到制作单界面
const prototypeRequestId = row.productionRequestId || this.ids;
this.$router.push(
"/mes/pro/productionMake/apply?productionRequestId=" + prototypeRequestId
);
return;
// 生成制作单
generate(row) {
// 跳转到制作单界面
const prototypeRequestId = row.productionRequestId || this.ids;
this.$router.push(
"/mes/pro/productionMake/apply?productionRequestId=" + prototypeRequestId
);
return;
},
},
};
</script>
......@@ -16,15 +16,17 @@
<PageWrapper>
<el-form
class="page-form"
:model="form"
ref="form"
size="small"
:inline="true"
label-width="8em"
label-width="100px"
>
<el-row>
<el-col :md="8" :xs="12">
<el-form-item label="申请单编码" prop="prototypeRequestCode">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item prop="prototypeRequestCode">
<template slot="label"> 申请单编码 </template>
<el-input
disabled
v-model="form.prototypeRequestCode"
......@@ -33,7 +35,7 @@
</el-form-item>
</el-col>
<el-col :md="8" :xs="12" style="height: 50.5px">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="产品" prop="itemId">
<el-input
v-model="form.itemName"
......@@ -49,7 +51,7 @@
<ItemSelect ref="ItemSelectRef" @onSelected="onItemSelect" />
</el-form-item>
</el-col>
<el-col :md="8" :xs="12" style="height: 50.5px">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="工艺路线" prop="routeId">
<el-input
v-model="form.routeName"
......@@ -68,9 +70,7 @@
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="8" :xs="12">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="简称" prop="abbreviation">
<el-input
v-model="form.abbreviation"
......@@ -78,7 +78,9 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
</el-row>
<el-row>
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="样品英文名" prop="enName">
<el-input
v-model="form.enName"
......@@ -86,14 +88,14 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="样品数量" prop="num">
<el-input v-model="form.num" placeholder="请输入样品数量">
<template slot="suffix">{{ form.unit }}</template>
</el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="打样形式" prop="type">
<el-input
v-model="form.type"
......@@ -101,7 +103,7 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="分配方式" prop="modality">
<el-input
v-model="form.modality"
......@@ -109,7 +111,7 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="表面处理" prop="surfaceTreatment">
<el-input
v-model="form.surfaceTreatment"
......@@ -117,7 +119,7 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="NG原因" prop="ngReason">
<el-input
v-model="form.ngReason"
......@@ -125,8 +127,11 @@
></el-input>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="计划完成日期" prop="plannedFinishDate">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item prop="plannedFinishDate">
<template slot="label">
<TipLabel title="完成日期" tip="计划完成日期" />
</template>
<el-date-picker
value-format="yyyy-MM-dd"
v-model="form.plannedFinishDate"
......@@ -134,8 +139,11 @@
></el-date-picker>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-form-item label="版面需求时间" prop="plannedLayoutDate">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item prop="plannedLayoutDate">
<template slot="label">
<TipLabel title="版面时间" tip="版面需求时间" />
</template>
<el-date-picker
value-format="yyyy-MM-dd"
v-model="form.plannedLayoutDate"
......@@ -143,7 +151,7 @@
></el-date-picker>
</el-form-item>
</el-col>
<el-col :md="8" :xs="12">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="测试标准" prop="testStandard">
<el-input
v-model="form.testStandard"
......@@ -153,7 +161,7 @@
</el-col>
</el-row>
<el-row>
<el-col :md="24" :xs="12">
<el-col :md="6" :sm="12" :xs="12">
<el-form-item label="备注" prop="remark">
<el-input
type="textarea"
......@@ -362,4 +370,4 @@ export default {
};
</script>
<style lang="scss" scoped></style>
<style lang="scss"></style>
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