Commit 1586601e authored by 周远喜's avatar 周远喜

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 83d0eae1 1963c6fd
<template> <template>
<span class="i-layout-header-trigger i-layout-header-trigger-min"> <span class="i-layout-header-trigger i-layout-header-trigger-min">
<Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown"> <Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown">
<span @click="openModelBugAdd"> <span @click="openModelBugAdd">
<Badge :count="bugCount === 0 ? null : bugCount" :overflow-count="99" :offset="[10, 0]"> <Badge :count="bugCount === 0 ? null : bugCount" :overflow-count="99" :offset="[10, 0]">
...@@ -11,15 +11,16 @@ ...@@ -11,15 +11,16 @@
<DropdownItem name="bug">bug列表</DropdownItem> <DropdownItem name="bug">bug列表</DropdownItem>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
<Modal title="新增bug" v-model="bugAdd" fullscreen :z-index="10"> <Modal title="新增bug" v-model="bugAdd" fullscreen :z-index="999">
<addBugModal ref="addBug"></addBugModal> <addBugModal ref="addBug"></addBugModal>
<div slot="footer"> <div slot="footer">
<Button @click="addCancel">取消</Button> <Button @click="addCancel">取消</Button>
<Button type="primary" @click="addSave">确定</Button> <Button type="primary" @click="addSave">确定</Button>
</div> </div>
</Modal> </Modal>
</span> </span>
</template> </template>
<script> <script>
import addBugModal from "@/pages/bug/component/add"; import addBugModal from "@/pages/bug/component/add";
export default { export default {
...@@ -30,14 +31,16 @@ export default { ...@@ -30,14 +31,16 @@ export default {
data() { data() {
return { return {
bugAdd: false, bugAdd: false,
bugCount:3 bugCount: 3
}; };
}, },
computed: {}, computed: {},
methods: { methods: {
async handleClickUserDropdown(name) { async handleClickUserDropdown(name) {
if (name === "bug") { if (name === "bug") {
this.$router.push({ name: "bug" }); this.$router.push({
name: "bug"
});
} }
}, },
openModelBugAdd() { openModelBugAdd() {
......
...@@ -344,7 +344,7 @@ henq.dirCode = (code, v) => { ...@@ -344,7 +344,7 @@ henq.dirCode = (code, v) => {
return items return items
} }
//colums验证start
henq.makeRules = (list, apiUrl) => { henq.makeRules = (list, apiUrl) => {
//测试数据start //测试数据start
...@@ -551,4 +551,5 @@ henq.makeRules = (list, apiUrl) => { ...@@ -551,4 +551,5 @@ henq.makeRules = (list, apiUrl) => {
}) })
return rules return rules
} }
//colums验证end
export default henq; export default henq;
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="8">
<FormItem label="紧急程度" style="width:100%"> <FormItem label="紧急程度" style="width:100%" prop="urgencyLevel">
<dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel"></dictionary> <dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel"></dictionary>
</FormItem> </FormItem>
</Col> </Col>
...@@ -136,6 +136,12 @@ export default { ...@@ -136,6 +136,12 @@ export default {
type: "number", type: "number",
trigger: "change", trigger: "change",
}, ], }, ],
urgencyLevel: [{
required: true,
message: "请选择紧急程度",
trigger: "change",
type: "number",
}, ],
}, },
wfstatu: 1, wfstatu: 1,
......
<template> <template>
<Form :model="orderSearchForm" :label-width="95" :rules="ruleValidate" ref="formValidate"> <Form :model="orderSearchForm" :label-width="95" :rules="ruleValidate" ref="formValidate">
<Row> <Row>
<Col span="8"> <Col span="8">
<FormItem label="订单编号" style="width:100%">{{this.orderSearchForm.mesCode}}</FormItem> <FormItem label="订单编号" style="width:100%">{{this.orderSearchForm.mesCode}}</FormItem>
</Col> </Col>
<Col span="8"> <Col span="8">
<FormItem :label="l('productName')" style="width:100%" prop="productId"> <FormItem :label="l('productName')" style="width:100%" prop="productId">
<Select <Select v-model="orderSearchForm.productId" :placeholder="placeholdeinfo" style="width:240px;">
v-model="orderSearchForm.productId" <Option v-for="(item,index) in list" :key="index" :value="item.value" style="display:none" :label="item.label"></Option>
:placeholder="placeholdeinfo"
style="width:240px;"
>
<Option
v-for="(item,index) in list"
:key="index"
:value="item.value"
style="display:none"
:label="item.label"
></Option>
<Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree> <Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree>
</Select> </Select>
</FormItem> </FormItem>
...@@ -33,11 +23,7 @@ ...@@ -33,11 +23,7 @@
<Row> <Row>
<Col span="8"> <Col span="8">
<FormItem :label="l('taskType')" style="width:100%" prop="taskType"> <FormItem :label="l('taskType')" style="width:100%" prop="taskType">
<dictionary <dictionary code="plan.order.taskType" v-model="orderSearchForm.taskType" style="width:240px"></dictionary>
code="plan.order.taskType"
v-model="orderSearchForm.taskType"
style="width:240px"
></dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="8">
...@@ -47,26 +33,14 @@ ...@@ -47,26 +33,14 @@
</Col> </Col>
<Col span="8"> <Col span="8">
<FormItem :label="l('demandStartDate')" style="width:100%"> <FormItem :label="l('demandStartDate')" style="width:100%">
<DatePicker <DatePicker type="date" placeholder="请选择日期" style="width:240px" @on-change="getStartDate" v-model="orderSearchForm.demandStartDate"></DatePicker>
type="date"
placeholder="请选择日期"
style="width:240px"
@on-change="getStartDate"
v-model="orderSearchForm.demandStartDate"
></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span="8"> <Col span="8">
<FormItem :label="l('demandFinishDate')" style="width:100%"> <FormItem :label="l('demandFinishDate')" style="width:100%">
<DatePicker <DatePicker type="date" placeholder="请选择日期" style="width:240px" @on-change="getFinishedDate" v-model="orderSearchForm.demandFinishDate"></DatePicker>
type="date"
placeholder="请选择日期"
style="width:240px"
@on-change="getFinishedDate"
v-model="orderSearchForm.demandFinishDate"
></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
...@@ -83,12 +57,8 @@ ...@@ -83,12 +57,8 @@
</Row> </Row>
<Row> <Row>
<Col span="8"> <Col span="8">
<FormItem :label="l('urgencyLevel')" style="width:100%"> <FormItem :label="l('urgencyLevel')" style="width:100%" prop="urgencyLevel">
<dictionary <dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel"></dictionary>
style="width:240px"
code="plan.order.urgencyLevel"
v-model="orderSearchForm.urgencyLevel"
></dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col span="24"> <Col span="24">
...@@ -110,8 +80,9 @@ ...@@ -110,8 +80,9 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
</Form> </Form>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
export default { export default {
...@@ -120,30 +91,30 @@ export default { ...@@ -120,30 +91,30 @@ export default {
return { return {
orderSearchForm: {}, orderSearchForm: {},
ruleValidate: { ruleValidate: {
productId: [ productId: [{
{
required: true, required: true,
message: "请选择产品名称", message: "请选择产品名称",
type: "number", type: "number",
trigger: "change", trigger: "change",
}, }, ],
], taskType: [{
taskType: [
{
required: true, required: true,
message: "请选择任务类型", message: "请选择任务类型",
trigger: "change", trigger: "change",
type: "number", type: "number",
}, }, ],
], quantity: [{
quantity: [
{
required: true, required: true,
message: "请输入数量", message: "请输入数量",
type: "number", type: "number",
trigger: "change", trigger: "change",
}, }, ],
], urgencyLevel: [{
required: true,
message: "请选择紧急程度",
trigger: "change",
type: "number",
}, ],
}, },
placeholdeinfo: "", placeholdeinfo: "",
list: [], list: [],
...@@ -177,7 +148,9 @@ export default { ...@@ -177,7 +148,9 @@ export default {
}, },
methods: { methods: {
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({
id: v
}).then((r) => {
this.entity = r.result; this.entity = r.result;
this.$emit("on-load"); this.$emit("on-load");
}); });
...@@ -215,7 +188,10 @@ export default { ...@@ -215,7 +188,10 @@ export default {
this.selectdata = []; this.selectdata = [];
this.selectdata = data; this.selectdata = data;
this.list = []; this.list = [];
this.list.push({ label: data[0].title, value: data[0].id }); this.list.push({
label: data[0].title,
value: data[0].id
});
if (data[0].isProduct == "1") { if (data[0].isProduct == "1") {
this.orderSearchForm.productName = data[0].title; this.orderSearchForm.productName = data[0].title;
this.orderSearchForm.productId = data[0].productId; this.orderSearchForm.productId = data[0].productId;
...@@ -258,7 +234,11 @@ export default { ...@@ -258,7 +234,11 @@ export default {
} }
}); });
}, },
renderContent(h, { root, node, data }) { renderContent(h, {
root,
node,
data
}) {
let type = "md-folder"; let type = "md-folder";
let title = data.title; let title = data.title;
if (data.isProduct != 0) { if (data.isProduct != 0) {
...@@ -274,8 +254,7 @@ export default { ...@@ -274,8 +254,7 @@ export default {
} }
} }
return h( return h(
"span", "span", {
{
on: { on: {
click: () => { click: () => {
let arrTree = []; let arrTree = [];
...@@ -294,8 +273,7 @@ export default { ...@@ -294,8 +273,7 @@ export default {
}, },
}), }),
h( h(
"span", "span", {
{
style: { style: {
color: data.isProduct == 0 ? "#000" : "rgba(38, 128, 235, 1)", color: data.isProduct == 0 ? "#000" : "rgba(38, 128, 235, 1)",
}, },
......
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