Commit 32390a56 authored by 仇晓婷's avatar 仇晓婷

工艺提醒ok

parent 76a32afb
......@@ -1427,6 +1427,19 @@ export default {
executive_branch: '执行部门',
},
remind:{//工艺提醒,工艺案例
title: '名称',
creator: '创建人',
content: '内容',
filePath: "上传文件", //文件路径
filePaths: "", //多个文件路径
dispatchId: '工单id',
routingDetailId: '工序id',
routingHeaderId: '工艺规程id',
type: '类型(1工艺案例,2工艺提醒)',
status:'状态'
},
product_info: {
mmcode: '物料编号',
materialId: '物料',
......
......@@ -45,10 +45,21 @@
<Menu mode="horizontal" theme="light" active-name="0">
<MenuItem name="0" :to="'/technology/details?id='+headerId+'&headerStatus='+headerStatus">工序</MenuItem>
<!-- <MenuItem name="1" :to="'/technology/details/routingStep?id='+headerId">工步</MenuItem> -->
<MenuItem name="2" :to="'/technology/details/routingqccard?id='+headerId+'&headerStatus='+headerStatus">质控卡</MenuItem>
<MenuItem name="3" :to="'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId">工艺BOM</MenuItem>
<MenuItem
name="2"
:to="'/technology/details/routingqccard?id='+headerId+'&headerStatus='+headerStatus"
>质控卡</MenuItem>
<MenuItem
name="3"
:to="'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId"
>工艺BOM</MenuItem>
<!-- <MenuItem name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> -->
<MenuItem name="5" :to="'/technology/details/routinghcorder?id='+headerId" v-show="headerStatus==1">工艺更改单</MenuItem>
<MenuItem
name="5"
:to="'/technology/details/routinghcorder?id='+headerId"
v-show="headerStatus==1"
>工艺更改单</MenuItem>
<MenuItem name="6" :to="'/technology/details/remind?id='+headerId">工艺提醒</MenuItem>
</Menu>
</div>
<div class="bottom_box">
......@@ -68,15 +79,14 @@ export default {
treeHeight: "",
actNum: "1",
headerId: -1,
headerStatus:-1,
productBomId:-1,
headerStatus: -1,
productBomId: -1,
};
},
created() {
this.headerId = this.$route.query.id;
this.headerStatus = this.$route.query.headerStatus;
this.productBomId = this.$route.query.productBomId;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
......@@ -84,7 +94,7 @@ export default {
mounted() {},
computed: {},
methods: {},
watch: {}
watch: {},
};
</script>
<style>
......
<template>
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="110">
<Row>
<Col span="12">
<FormItem :label="l('title')" prop="title ">
<Input v-model="entity.title"></Input>
</FormItem>
</Col>
<Col span="12">
<FormItem :label="l('status')" prop="status">
<Select v-model="entity.status">
<Option :value="1">启用</Option>
<Option :value="0">禁用</Option>
</Select>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('filePath')" prop="filePaths">
<files ref="refFile" :parms="parms" files />
</FormItem>
</Col>
<Col span="24">
<FormItem :label="l('content')" prop="content ">
<Input v-model="entity.content" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
</Row>
<Row>
<Col span="24" style="text-align:right">
<FormItem label>
<Button @click="handleClose" class="ml20">取消</Button>&nbsp;&nbsp;
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>&nbsp;&nbsp;
</FormItem>
</Col>
</Row>
</Form>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
disabled: false,
submitShow: true, //送审按钮显隐
checked: true, //送审选择框
entity: {
routingHeaderId: this.eid, //工艺规程id
type: 2,
filePath: "", //文件路径
filePaths: "", //多个文件路径
creator: this.$store.state.userInfo.userId,
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
},
parms: {
app: "technology",
eid: null,
name: "",
field: "",
},
};
},
props: {
eid: Number,
},
mounted() {
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
this.entity.filePaths = "";
if (this.$refs.refFile.nameList.length > 0) {
let nameList = this.$refs.refFile.nameList;
let names = [];
nameList.forEach((e) => {
names.push(e.fileName);
});
this.entity.filePaths = JSON.stringify(names)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, ""); //附件本地库暂存文件名称
}
Api.create(this.entity)
.then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
this.$refs.refFile.intFiles();
})
.catch((err) => {
this.disabled = false;
this.$Message.error("保存失败");
});
}
});
},
handleClose() {
this.$emit("on-close");
},
ok() {
this.$emit("on-ok");
},
l(key) {
key = "remind" + "." + key;
return this.$t(key);
},
},
watch: {},
};
</script>
import Api from '@/plugins/request'
export default {
index: `${technologyUrl}processcase/paged`,
paged(params) {
return Api.post(`${technologyUrl}processcase/paged`, params);
},
create(params) {
return Api.post(`${technologyUrl}processcase/create`, params);
},
}
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" clearable/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="800" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "",
data() {
return {
action: Api.index,
easySearch: {
keys: { op: "title", value: null },
type: { op: "Equal", value: 2 },
routingHeaderId: { op: "Equal", value: this.headerid },
},
modal: false,
title: "新增",
detail: null,
curId: 0,
columns: [
{
key: "title",
title: this.l("title"),
align: "left",
},
{
key: "creator",
title: this.l("creator"),
align: "left",
type: "user",
},
{
key: "content",
title: this.l("content"),
align: "left",
},
{
key: "filePaths",
title: this.l("filePath"),
align: "left",
easy: true,
},
{
key: "status",
title: this.l("status"),
align: "left",
easy: true,
code: "process.status",
},
],
};
},
props: ["headerid"],
mounted() {
// console.log(this);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
add() {
this.curId = this.headerid;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
cancel() {
this.curId = 0;
this.modal = false;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
l(key) {
key = "remind" + "." + key;
return this.$t(key);
},
},
};
</script>
<style lang="less">
</style>
\ 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