Commit b6f1c961 authored by 仇晓婷's avatar 仇晓婷

工艺提醒ok

parent 88aeab98
......@@ -1436,9 +1436,10 @@ export default {
filePaths: "", //多个文件路径
dispatchId: '工单id',
routingDetailId: '工序id',
routingDetail:'工序',
routingHeaderId: '工艺规程id',
type: '类型(1工艺案例,2工艺提醒)',
status:'状态'
status:'状态',
},
product_info: {
......
......@@ -2,8 +2,19 @@
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="110">
<Row>
<Col :span="12">
<FormItem :label="l('routingDetail')" prop="routingDetailId">
<Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem>
</Col>
<Col span="12">
<FormItem :label="l('title')" prop="title ">
<FormItem :label="l('title')" prop="title">
<Input v-model="entity.title"></Input>
</FormItem>
</Col>
......@@ -21,7 +32,7 @@
</FormItem>
</Col>
<Col span="24">
<FormItem :label="l('content')" prop="content ">
<FormItem :label="l('content')" prop="content">
<Input v-model="entity.content" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
......@@ -40,7 +51,7 @@
</template>
<script>
import Api from "./api";
import ApiDetail from "../api";
export default {
name: "Add",
......@@ -58,8 +69,18 @@ export default {
filePaths: "", //多个文件路径
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
title: [{ required: true, message: "必填", trigger: "blur" }],
content: [{ required: true, message: "必填", trigger: "blur" }],
routingDetailId: [
{
required: true,
message: "请选择工序",
type: "number",
trigger: "change",
},
],
},
routingDetailList: [],
parms: {
app: "technology",
eid: null,
......@@ -68,14 +89,30 @@ export default {
},
};
},
props: {
eid: String,
},
props: ["eid"],
mounted() {
this.loadDetails();
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
},
methods: {
loadDetails() {
//获取工序列表
let parms = {
headerID: this.eid,
};
ApiDetail.pagedDetails(parms).then((r) => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach((data) => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.taskSeq + " " + data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
......
......@@ -38,6 +38,18 @@ export default {
detail: null,
curId: 0,
columns: [
{
type: "index",
width: 60,
align: "center",
},
{
key: "routingDetail",
title: this.l("routingDetail"),
align: "left",
high: true,
tooltip: true,
},
{
key: "title",
title: this.l("title"),
......@@ -117,6 +129,8 @@ export default {
props: ["headerid"],
mounted() {
// console.log(this);
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
......
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