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

Merge branch 'ting-p' into product

parents faa5b1e7 d7c7ed19
...@@ -29,56 +29,70 @@ ...@@ -29,56 +29,70 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
<h4>扩展属性</h4> <h4>扩展属性</h4>
<Table border :columns="columns" :data="checkList" height="300"> <Table border :columns="columns" :data="checkList" height="300">
<template slot-scope="{ row, index }" slot="title"> <template slot-scope="{ row, index }" slot="title">
<div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div> <div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div>
<Input <Input
v-if="row.fieldType==3" v-if="row.fieldType==3"
v-model="row.title" v-model="row.title"
placeholder="请输入" placeholder="请输入"
@on-blur="setRow(row,index)" @on-blur="setRow(row,index)"
/> />
</template> </template>
<template slot-scope="{ row, index }" slot="note"> <template slot-scope="{ row, index }" slot="note">
<div v-if="row.fieldType==1">{{row.note}}</div> <div v-if="row.fieldType==1">{{row.note}}</div>
<Input v-model="row.note" placeholder="请输入" @on-blur="setRow(row,index)" v-else /> <Input v-model="row.note" placeholder="请输入" @on-blur="setRow(row,index)" v-else />
</template> </template>
<template slot-scope="{ row, index }" slot="dataType"> <template slot-scope="{ row, index }" slot="dataType">
<state <state
v-if="row.fieldType==1" v-if="row.fieldType==1"
code="materail.category.dataType" code="materail.category.dataType"
:value="row.dataType" :value="row.dataType"
type="text" type="text"
></state> ></state>
<Dictionary <Dictionary
v-else v-else
@on-change="setRow(row,index)" @on-change="setRow(row,index)"
v-model="row.dataType" v-model="row.dataType"
code="materail.category.dataType" code="materail.category.dataType"
type="select" type="select"
:value="row.dataType" :value="row.dataType"
:key="row.dataType" :key="row.dataType"
></Dictionary> ></Dictionary>
</template> </template>
<!-- <template slot-scope="{ row, index }" slot="result"> <template slot-scope="{ row, index }" slot="dataType">
<Input v-model="row.result" placeholder="请输入" @on-blur="setRow(row,index)" /> <!-- <state
</template>--> v-if="row.fieldType==1"
<template slot-scope="{ row, index }" slot="required"> code="materail.main.company"
<Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox> :value="row.company"
</template> type="text"
<template slot-scope="{ row, index }" slot="isUnique"> ></state> -->
<Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox> <Dictionary
</template> @on-change="setRow(row,index)"
<template v-model="row.company"
slot-scope="{ row, index }" code="materail.main.company"
slot="action" type="select"
v-if="row.fieldType==2||row.fieldType==3" :value="row.company"
> :key="row.company"
<a @click="remove(index,row)" style="color:#FF7A8B">删除</a> ></Dictionary>
</template> </template>
</Table> <template slot-scope="{ row, index }" slot="required">
<Button type="dashed" long @click="addNew" class="mt10">新增属性</Button> <Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox>
</template>
<template slot-scope="{ row, index }" slot="isUnique">
<Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox>
</template>
<template
slot-scope="{ row, index }"
slot="action"
v-if="row.fieldType==2||row.fieldType==3"
>
<a @click="remove(index,row)" style="color:#FF7A8B">删除</a>
</template>
</Table>
<Button type="dashed" long @click="addNew" class="mt10">新增属性</Button>
</Col> </Col>
<Col :span="24" class="tr mt10"> <Col :span="24" class="tr mt10">
<FormItem> <FormItem>
...@@ -129,12 +143,12 @@ export default { ...@@ -129,12 +143,12 @@ export default {
align: "center", align: "center",
slot: "dataType" slot: "dataType"
}, },
// { {
// title: "是否显示", title: "单位",
// key: "result", key: "company",
// align: "center", align: "center",
// slot: "result" slot: "company"
// }, },
{ {
title: "是否必填", title: "是否必填",
key: "required", key: "required",
...@@ -181,7 +195,11 @@ export default { ...@@ -181,7 +195,11 @@ export default {
} }
]; ];
Api.listTable({ conditions: conditions ,sortBy:'id',isDesc:false}).then(r => { Api.listTable({
conditions: conditions,
sortBy: "id",
isDesc: false
}).then(r => {
if (r.result) { if (r.result) {
var arr = r.result; var arr = r.result;
this.checkList = arr.filter(function(item) { this.checkList = arr.filter(function(item) {
......
...@@ -122,6 +122,7 @@ export default { ...@@ -122,6 +122,7 @@ export default {
methods: { methods: {
clickItem(val) { clickItem(val) {
this.nodeInfo.codeRuleId = val; this.nodeInfo.codeRuleId = val;
this.model8 = val;
this.loadTree(this.nodeInfo.codeRuleId); this.loadTree(this.nodeInfo.codeRuleId);
this.cityList.forEach(e => { this.cityList.forEach(e => {
if (val == e.id) { if (val == e.id) {
......
...@@ -26,4 +26,7 @@ export default { ...@@ -26,4 +26,7 @@ export default {
categoryList(params){ categoryList(params){
return Api.post(`${systemUrl}/actionlog/list`,params); return Api.post(`${systemUrl}/actionlog/list`,params);
}, },
batchstart(params) {
return Api.post(`${workflowUrl}/instance/batchstart`, params); //送审
},
} }
\ No newline at end of file
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
entity: {}, entity: {},
easySearch: { easySearch: {
keys: { op: "title", value: "" }, keys: { op: "title", value: "" },
table: { op: "Equal", value: "material" }, tableTitle: { op: "Equal", value: "material" },
tId: { tId: {
op: "Equal", op: "Equal",
value: this.$route.query.id value: this.$route.query.id
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
:initsearch="sets" :initsearch="sets"
:high="false" :high="false"
:height="tableHeight" :height="tableHeight"
@on-selection-change="onSelect"
> >
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
...@@ -24,19 +25,29 @@ ...@@ -24,19 +25,29 @@
</FormItem> </FormItem>
</Form> </Form>
</template> </template>
<!-- <template slot="searchForm">
<Search />
</template>-->
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
<template slot="batch">
<Button type="primary" @click="modalSchedule">批量送审</Button>
</template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1000" footer-hide :mask-closable="false"> <Modal
v-model="modal"
:title="title"
width="1000"
footer-hide
:mask-closable="false"
:fullscreen="fullscreen"
>
<component <component
:is="detail" :is="detail"
:eid="curId" :eid="curId"
:rowsTable="rowsTable"
:nodeInfo="nodeInfo" :nodeInfo="nodeInfo"
@on-close="cancel" @on-close="cancel"
@on-cancel="cancel"
@on-ok="ok" @on-ok="ok"
ref="chlidren" ref="chlidren"
/> />
...@@ -59,6 +70,9 @@ export default { ...@@ -59,6 +70,9 @@ export default {
modal: false, modal: false,
title: "新增", title: "新增",
curId: 0, curId: 0,
selectRows: [],
rowsTable: [],
fullscreen: false,
detail: null, detail: null,
sets: v => { sets: v => {
v.categoryId = this.nodeInfo.categoryId; v.categoryId = this.nodeInfo.categoryId;
...@@ -72,12 +86,11 @@ export default { ...@@ -72,12 +86,11 @@ export default {
} }
}, },
columns: [ columns: [
// { {
// key: "index", type: "selection",
// title: "#", width: 70,
// align: "left", align: "center"
// width: 60 },
// },
{ {
key: "code", key: "code",
title: "编码", title: "编码",
...@@ -177,6 +190,18 @@ export default { ...@@ -177,6 +190,18 @@ export default {
}; };
}, },
methods: { methods: {
onSelect(a, b) {
//批量选择
this.selectRows = a;
},
modalSchedule() {
this.fullscreen = true;
this.rowsTable = this.selectRows;
this.title = "物料送审";
this.curId = 0;
this.detail = () => import("./submit");
this.modal = true;
},
search() { search() {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
...@@ -227,6 +252,14 @@ export default { ...@@ -227,6 +252,14 @@ export default {
} }
}); });
}, },
send(row) {
this.fullscreen = true;
this.curId = row.id;
this.title = "物料送审";
this.detail = () => import("./submit");
this.rowsTable = [];
this.modal = true;
},
ok() { ok() {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
this.modal = false; this.modal = false;
...@@ -235,8 +268,7 @@ export default { ...@@ -235,8 +268,7 @@ export default {
cancel() { cancel() {
this.curId = 0; this.curId = 0;
this.modal = false; this.modal = false;
}, }
send(row) {}
}, },
watch: { watch: {
nodeInfo: { nodeInfo: {
......
<template>
<div class="submit" :style="{ height: divHeight }">
<div class="body-procee">
<div class="new-detail" v-if="osrOneList1">
<Row>
<Filed :span="8" name="编码:">{{entity.code}}</Filed>
<Filed :span="8" name="名称:">{{entity.name}}</Filed>
<Filed :span="8" name="状态:">
<State code="materail.category.status" :value="parseInt(entity.status)" />
</Filed>
<Filed :span="8" name="版本:">{{entity.version}}</Filed>
<Filed :span="8" name="描述:">{{entity.description}}</Filed>
</Row>
</div>
<Table
:loading="loading"
border
:columns="columns"
:data="dataList"
class="tableCommon"
v-if="osrOneList2"
></Table>
<Process ref="userProcess" schemaIdVal="b6303ddc-8b5e-40a3-a51b-294657d1d913" />
<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>
<script>
import Process from "@/components/orderOperator/process";
import Api from "./api";
export default {
name: "orderSendReview",
components: {
Process
},
props: ["eid", "rowsTable"],
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
rowId: "",
entity: {},
metCodesStrTxt: "",
results: {},
loading: false,
ModalInfo: false,
divHeight: "300px",
osrOneList1: false, //一条数据显示
osrOneList2: false,
info: true,
ruleValidate: {},
orderSearchForm: {
reviewUser: "" //订单名称
},
dataList: [],
dataListRetrun: [], //确定后返回数据
dataListRetrunNew: {
schemaId: "b6303ddc-8b5e-40a3-a51b-294657d1d913", //合格证流程id:schemaId
idList: [], //合格证id List
codeList: [], //合格证编号List
operatorIdList: [] //操作员id
}, //确定后返回数据
columns: [
{
key: "code",
title: "编码",
align: "left",
render: (h, params) => {
return h(
"a",
{
props: {},
on: {
click: () => this.details(params.row.id)
}
},
params.row.code
);
}
},
{
key: "name",
title: "名称",
align: "left"
},
{
key: "status",
title: "状态",
align: "left",
render: (h, params) => {
return h("state", {
props: {
code: "materail.category.status",
type: "text",
value: params.row.status + ""
}
});
}
},
{
key: "version",
title: "版本",
align: "left"
},
{
key: "description",
title: "描述",
align: "left"
}
]
};
},
created() {
var theight = window.innerHeight - 120 + "px";
this.divHeight = theight;
if (this.eid !== 0) {
this.osrOneList1 = true;
this.osrOneList2 = false;
this.getDetails(this.eid);
} else {
this.osrOneList1 = false;
this.osrOneList2 = true;
this.dataList = this.rowsTable;
}
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.divHeight = window.screenHeight - 120 + "px";
})();
};
},
methods: {
getDetails(v) {
Api.get({ id: v }).then(r => {
if (r.result) {
this.entity = r.result;
}
});
},
returnDataList() {
let ues = this.$refs.userProcess;
this.dataListRetrunNew.operatorIdList = ues.immutData;
alert(JSON.stringify(this.dataListRetrunNew));
// //返回审批数据
return this.dataListRetrunNew;
},
upSave() {
let codeList = [];
let idList = [];
idList.push(this.rowId);
codeList.push(this.entity.code);
if (this.eid !== 0) {
idList.push(this.rowId);
codeList.push(this.entity.code);
} else {
this.rowsTable.forEach(e => {
idList.push(e.id);
codeList.push(e.code);
});
}
this.dataListRetrunNew.idList = idList;
this.dataListRetrunNew.codeList = codeList;
let metCodesStr = JSON.stringify(codeList)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, "");
this.ModalInfoStaut = "orderSendReview";
this.metCodesStrTxt = "确定物料 " + metCodesStr + "?";
this.ModalInfo = true;
alert(this.dataListRetrunNew.idList);
alert(this.dataListRetrunNew.codeList);
},
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");
}
}
};
</script>
<style lang="less">
.submit {
.body-procee {
width: 80%;
margin: 0 auto;
}
}
</style>
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="8">
<FormItem :label="l('capabilityValue')"> <FormItem :label="l('capabilityValue')">
<InputNumber v-model="entity.capabilityValue"></InputNumber> <InputNumber v-model="entity.capabilityValue"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col span="4"> <Col span="8">
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
</FormItem> </FormItem>
...@@ -308,8 +308,6 @@ export default { ...@@ -308,8 +308,6 @@ export default {
.form-row { .form-row {
width: 600px; width: 600px;
margin-left: 50px; margin-left: 50px;
margin-top: -45px;
.ivu-form-item-label { .ivu-form-item-label {
color: #fff !important; color: #fff !important;
} }
......
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