Commit 8f720f24 authored by 仇晓婷's avatar 仇晓婷

文档送审

parent 85b2ed01
...@@ -218,23 +218,18 @@ ...@@ -218,23 +218,18 @@
</Col> </Col>
</Row> </Row>
</Form> </Form>
<!-- <Modal v-model="modal" title="文档送审" footer-hide fullscreen :mask-closable="false">
<Submit :isId="isId" ref="submit" @on-close="close"></Submit>
</Modal>-->
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
// import Submit from "./submit";
export default { export default {
name: "Add", name: "Add",
components: { components: {},
// Submit,
},
data() { data() {
return { return {
// modal: false, // modal: false,
isId: "",
imgName: "", imgName: "",
avatorPath: "", avatorPath: "",
fileds: [], //扩展属性 fileds: [], //扩展属性
...@@ -339,12 +334,6 @@ export default { ...@@ -339,12 +334,6 @@ export default {
Api.create(this.entity) Api.create(this.entity)
.then((r) => { .then((r) => {
if (r.success) { if (r.success) {
// if (this.entity.status == 1) {
// this.modal = true;
// this.isId = r.result.id;
// } else {
// this.modal = false;
// }
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
} else { } else {
......
...@@ -27,4 +27,7 @@ export default { ...@@ -27,4 +27,7 @@ export default {
listbyid(params){ listbyid(params){
return Api.get(`${material}/documentpropertydefinition/listbyid`,params); return Api.get(`${material}/documentpropertydefinition/listbyid`,params);
}, },
batchstart(params) {
return Api.post(`${workflowUrl}/instance/batchstart`, params); //送审
},
} }
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</a> </a>
</div> </div>
<Content :class="!showMenu ? 'con_bord' : ''"> <Content :class="!showMenu ? 'con_bord' : ''">
<Word ref="dataTable" :treeId="treeId" :addShow="addShow" :ids="ids" /> <Word ref="dataTable" :treeId="treeId" :addShow="addShow" :ids="ids" :workFlowIds="workFlowIds"/>
</Content> </Content>
</Layout> </Layout>
</div> </div>
...@@ -70,6 +70,7 @@ export default { ...@@ -70,6 +70,7 @@ export default {
treeId: 0, treeId: 0,
addShow: false, addShow: false,
ids: [], ids: [],
workFlowIds:''
}; };
}, },
mounted() { mounted() {
...@@ -127,7 +128,7 @@ export default { ...@@ -127,7 +128,7 @@ export default {
"upId" "upId"
); );
this.list = this.$u.clone(data); this.list = this.$u.clone(data);
// console.log(this.list); // console.log(this.list);
}); });
}, },
toggle() { toggle() {
...@@ -142,8 +143,9 @@ export default { ...@@ -142,8 +143,9 @@ export default {
}, },
change(a, b) { change(a, b) {
// console.log(a) // console.log(a)
// console.log(b); console.log(b);
this.treeId = b.id; this.treeId = b.id;
this.workFlowIds=b.workFlowIds //流程id
// if (b.children.length == 0) { //判断最底层才能添加文档 // if (b.children.length == 0) { //判断最底层才能添加文档
// this.addShow = true; // this.addShow = true;
// this.$refs.dataTable.$refs.grid.reload(this.easySearch); // this.$refs.dataTable.$refs.grid.reload(this.easySearch);
......
<template> <template>
<div class=".detail-document"> <div class=".detail-document">
<div class="body-document"> {{ workFlowIds }}
<div class="body-document" v-if="eid != 0">
<h4>详细信息</h4> <h4>详细信息</h4>
<Row> <Row>
<Col span="20"> <Col span="20">
<div class="new-detail detail-d"> <div class="new-detail detail-d">
<Row> <Row>
<Filed v-for="li in fileds" :key="li.field" :span="li.span" :name="li.title+':'"> <Filed
<State v-if="li.dataType==3" :code="li.note" :value="entity[li.field]" /> v-for="li in fileds"
<div v-else-if="li.dataType==8">{{entity[li.field]}}</div> :key="li.field"
<div v-else-if="li.dataType==5" v-html="entity[li.field]"></div> :span="li.span"
<DTSpan v-else-if="li.dataType==4" :value="entity[li.field]" /> :name="li.title + ':'"
<span v-else>{{entity[li.field]}}</span> >
<State <State
v-if="li.unitName&&(li.dataType==1||li.dataType==2)" v-if="li.dataType == 3"
:code="li.note"
:value="entity[li.field]"
/>
<div v-else-if="li.dataType == 8">{{ entity[li.field] }}</div>
<div
v-else-if="li.dataType == 5"
v-html="entity[li.field]"
></div>
<DTSpan
v-else-if="li.dataType == 4"
:value="entity[li.field]"
/>
<span v-else>{{ entity[li.field] }}</span>
<State
v-if="li.unitName && (li.dataType == 1 || li.dataType == 2)"
:code="li.note" :code="li.note"
:value="entity[li.field]" :value="entity[li.field]"
/> />
</Filed> </Filed>
</Row> </Row>
<Row class="filed-d"> <Row class="filed-d">
<Filed :span="12" :name="l('creationTime')+':'">{{entity.creationTime}}</Filed> <Filed :span="12" :name="l('creationTime') + ':'">{{
<Filed :span="12" :name="l('creatorUserId')+':'"> entity.creationTime
}}</Filed>
<Filed :span="12" :name="l('creatorUserId') + ':'">
<User :value="entity.creatorUserId" /> <User :value="entity.creatorUserId" />
</Filed> </Filed>
<Filed :span="12" :name="l('status')+':'">{{entity.status==0?'草稿':'送审'}}</Filed> <Filed :span="12" :name="l('status') + ':'">{{
<Filed :span="24" :name="l('filePath')+':'"> entity.status == 0 ? "草稿" : "送审"
}}</Filed>
<Filed :span="24" :name="l('filePath') + ':'">
<files ref="refFile" :parms="parms" :showList="false" /> <files ref="refFile" :parms="parms" :showList="false" />
</Filed> </Filed>
</Row> </Row>
...@@ -33,27 +53,91 @@ ...@@ -33,27 +53,91 @@
</Col> </Col>
<Col span="4" class="dcm-right"> <Col span="4" class="dcm-right">
<div class="img-touxiang"> <div class="img-touxiang">
<img :src="downUrl+avatorPath" v-if="avatorPath" /> <img :src="downUrl + avatorPath" v-if="avatorPath" />
<img src="@/assets/images/files_header.png" v-else width="100%" height="100%" /> <img
src="@/assets/images/files_header.png"
v-else
width="100%"
height="100%"
/>
</div> </div>
</Col> </Col>
</Row> </Row>
</div> </div>
<!-- <DataGrid
v-else
:columns="cols"
ref="grid"
:conditions="easySearch"
:action="action"
:initsearch="sets"
:tool="false"
:page="false"
:height="300"
:format="formatFun"
/> -->
<DataGrid
v-else
:height="300"
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
:high="false"
:tool="false"
:page="false"
:format="formatFun"
/>
<Process ref="userProcess" :schemaIdVal="workFlowIds" />
<div slot="footer">
<Button @click="modalInfo">取消</Button>
<Button type="primary" @click="upSave">确定送审</Button>
</div>
<!-- 信息提示 -->
<Modal
v-model="ModalInfo"
title="信息提示"
width="600"
:mask-closable="false"
:scrollable="true"
ok-text="确定"
cancel-text="取消"
>
{{ metCodesStrTxt }}
<div slot="footer">
<Button @click="ModalInfo = false">取消</Button>
<Button type="primary" @click="modalInfoOk">确定</Button>
</div>
</Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Process from "@/components/orderOperator/process";
export default { export default {
name: "Add", name: "submit",
components: {
Process,
},
data() { data() {
return { return {
action: Api.index,
avatorPath: "", avatorPath: "",
downUrl: fileUrlDown, downUrl: fileUrlDown,
entity: {}, entity: {},
ModalInfo: false,
metCodesStrTxt: "",
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }], code: [{ required: true, message: "必填", trigger: "blur" }],
}, },
easySearch: {
keys: { op: "refName,name", value: null },
categoryId: {
op: "In",
value: this.ids,
},
},
fileds: [], fileds: [],
parms: { parms: {
app: "material", app: "material",
...@@ -61,14 +145,78 @@ export default { ...@@ -61,14 +145,78 @@ export default {
name: "", name: "",
field: "", field: "",
}, },
dataListRetrunNew: {
schemaId: this.workFlowIds, //流程id
idList: [], //合格证id List
codeList: [], //合格证编号List
operatorIdList: [], //操作员id
}, //确定后返回
columns: [
{
type: "selection",
width: 70,
align: "center",
},
{
key: "id",
title: this.$t("id"),
hide: true,
align: "left",
high: true,
},
{ key: "name", title: this.l("title"), align: "left", high: true },
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
easy: true,
high: true,
},
{
key: "code",
title: this.l("name"),
align: "left",
high: true,
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: "word.document.status",
},
{
key: "version",
title: this.l("revision"),
align: "left",
high: true,
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
type: "user",
},
],
}; };
}, },
props: ["eid", "treeId"],
props: ["eid", "ids", "treeId", "rowsTable", "workFlowIds"],
mounted() { mounted() {
this.dataListRetrunNew.schemaId = this.workFlowIds;
this.initFiled(); this.initFiled();
this.parms.eid = this.$u.guid(); this.parms.eid = this.$u.guid();
}, },
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: { methods: {
//格式化原始数据
formatFun(data) {
data = this.rowsTable;
return data;
},
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then((r) => {
this.entity = r.result; this.entity = r.result;
...@@ -111,6 +259,60 @@ export default { ...@@ -111,6 +259,60 @@ export default {
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
upSave() {
this.dataListRetrunNew.idList = [];
this.dataListRetrunNew.codeList = [];
let codeList = [];
let idList = [];
if (this.eid !== 0) {
if (this.entity.code != 0) {
codeList.push(this.entity.code);
} else {
codeList.push(this.eid);
}
idList.push(this.eid);
} else {
this.rowsTable.forEach((e) => {
idList.push(e.id);
if (e.code) {
codeList.push(e.code);
} else {
codeList.push(e.id);
}
});
}
this.dataListRetrunNew.idList = idList;
this.dataListRetrunNew.codeList = codeList;
let metCodesStr = JSON.stringify(codeList)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, "");
this.ModalInfoStaut = "orderSendReview";
this.metCodesStrTxt = "确定送审此文档吗? ";
this.ModalInfo = true;
},
returnDataList() {
let ues = this.$refs.userProcess;
this.dataListRetrunNew.operatorIdList = ues.immutData;
alert(JSON.stringify(this.dataListRetrunNew));
// //返回审批数据
return this.dataListRetrunNew;
},
modalInfoOk() {
let ues = this.$refs.userProcess;
this.dataListRetrunNew.operatorIdList = ues.immutData;
Api.batchstart(this.dataListRetrunNew).then((r) => {
if (r.success) {
this.ModalInfo = false;
this.$Message.success("送审成功");
this.$emit("on-close");
this.$emit("on-ok");
}
});
},
modalInfo() {
this.$emit("on-close");
},
l(key) { l(key) {
key = "document_property_definition" + "." + key; key = "document_property_definition" + "." + key;
return this.$t(key); return this.$t(key);
...@@ -160,7 +362,7 @@ export default { ...@@ -160,7 +362,7 @@ export default {
} }
} }
.detail-d { .detail-d {
padding-left: 20px; padding: 10px;
.filed-d { .filed-d {
border-top: 1px solid #e0e0e0; border-top: 1px solid #e0e0e0;
} }
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
:type="typeInfo" :type="typeInfo"
:span="6" :span="6"
:lazy="true" :lazy="true"
:format="formatFun"
@on-selection-change="onSelect"
> >
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
...@@ -35,6 +37,9 @@ ...@@ -35,6 +37,9 @@
@click="changeShwo" @click="changeShwo"
></Button> ></Button>
</template> </template>
<template slot="batch">
<Button type="primary" @click="modalSchedule">批量送审</Button>
</template>
<template slot="card" slot-scope="{ row }"> <template slot="card" slot-scope="{ row }">
<div class="body-card"> <div class="body-card">
<Row class="title-i"> <Row class="title-i">
...@@ -80,6 +85,10 @@ ...@@ -80,6 +85,10 @@
<a @click="remove(row.id)"> <Icon type="ios-trash" />删除 </a <a @click="remove(row.id)"> <Icon type="ios-trash" />删除 </a
>&nbsp; >&nbsp;
<a @click="view(row.id)"> <Icon type="md-document" />详情 </a> <a @click="view(row.id)"> <Icon type="md-document" />详情 </a>
&nbsp;
<a @click="sub(row.id)" v-if="row.status == 1">
<Icon type="md-color-wand" />送审
</a>
</div> </div>
</Col> </Col>
</Row> </Row>
...@@ -97,7 +106,10 @@ ...@@ -97,7 +106,10 @@
<component <component
:is="detail" :is="detail"
:eid="curId" :eid="curId"
ids:ids
:treeId="treeId" :treeId="treeId"
:rowsTable="rowsTable"
:workFlowIds="workFlowIds"
@on-close="cancel" @on-close="cancel"
@on-ok="ok" @on-ok="ok"
/> />
...@@ -124,6 +136,11 @@ export default { ...@@ -124,6 +136,11 @@ export default {
curId: 0, curId: 0,
downUrl: fileUrlDown, downUrl: fileUrlDown,
columns: [ columns: [
{
type: "selection",
width: 70,
align: "center",
},
{ {
key: "id", key: "id",
title: this.$t("id"), title: this.$t("id"),
...@@ -150,11 +167,7 @@ export default { ...@@ -150,11 +167,7 @@ export default {
title: this.l("status"), title: this.l("status"),
align: "left", align: "left",
high: true, high: true,
render: (h, params) => { code: "word.document.status",
return h("div", [
h("span", params.row.status == 0 ? "草稿" : "送审"),
]);
},
}, },
{ {
key: "version", key: "version",
...@@ -172,8 +185,8 @@ export default { ...@@ -172,8 +185,8 @@ export default {
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 140, width: 180,
align: "center", align: "left",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
h( h(
...@@ -201,6 +214,14 @@ export default { ...@@ -201,6 +214,14 @@ export default {
}, },
"删除" "删除"
), ),
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.sub(params.row.id) },
},
params.row.status == 1 ? "送审" : ""
),
]); ]);
}, },
}, },
...@@ -210,18 +231,38 @@ export default { ...@@ -210,18 +231,38 @@ export default {
titleInfo: "卡片模式", titleInfo: "卡片模式",
ModalIm: false, ModalIm: false,
temTitle: "文档管理", temTitle: "文档管理",
selectRows: [],
rowsTable: [],
}; };
}, },
props: { props: {
treeId: Number, treeId: Number,
addShow: Boolean, addShow: Boolean,
ids: Array, ids: Array,
workFlowIds: String,
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() {}, mounted() {},
methods: { methods: {
//格式化原始数据
formatFun(data) {
data.map((e) => {
if (e.status == 1) {
e._disabled = false;
} else {
e._disabled = true;
}
});
return data;
},
onSelect(a, b) {
// console.log(a);
// console.log(b);
//批量选择
this.selectRows = a;
},
changeShwo() { changeShwo() {
//显示模式切换 //显示模式切换
if (this.typeInfo == "card") { if (this.typeInfo == "card") {
...@@ -257,7 +298,21 @@ export default { ...@@ -257,7 +298,21 @@ export default {
// } // }
} }
}, },
sub(id) {
this.fullscreen = true;
this.curId = id;
this.title = "文档送审";
this.detail = () => import("./submit");
this.modal = true;
},
modalSchedule() {
this.fullscreen = true;
this.rowsTable = this.selectRows;
this.title = "文档送审";
this.curId = 0;
this.detail = () => import("./submit");
this.modal = true;
},
view(id) { view(id) {
this.fullscreen = true; this.fullscreen = true;
this.curId = id; this.curId = id;
......
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