Commit d176f45a authored by renjintao's avatar renjintao

Merge branch 'master' of git.mes123.com:zhouyx/mes-ui

parents bc18559c 86ee5a42
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row> <Row>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('tASKSEQ')" prop="tASKSEQ"> <FormItem :label="l('tASKSEQ')" prop="tASKSEQ">
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('rUNTIME')" prop="rUNTIME"> <FormItem :label="l('rUNTIME')" prop="rUNTIME">
<!-- v-model="value1" --> <!-- v-model="value1" -->
<InputNumber :max="10" :min="1"></InputNumber> <InputNumber :max="100" :min="1"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
......
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
}); });
}, },
clear() { clear() {
if (this.list.lenght > 0) { if (this.list.length > 0) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "清空列表", title: "清空列表",
content: "您确定要清空列表吗", content: "您确定要清空列表吗",
......
...@@ -107,13 +107,13 @@ ...@@ -107,13 +107,13 @@
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Add from './add' import Add from "./add";
import Edit from './edit' import Edit from "./edit";
import Detail from './detail' import Detail from "./detail";
export default { export default {
name: 'list', name: "list",
components: { components: {
Add, Add,
Edit, Edit,
...@@ -124,14 +124,14 @@ export default { ...@@ -124,14 +124,14 @@ export default {
action: Api.index, action: Api.index,
list: [ list: [
{ {
name: 'jjk' name: "jjk"
} }
], ],
isactive: null, isactive: null,
keys: '', keys: "",
easySearch: { easySearch: {
keys: { op: 'name', value: null }, keys: { op: "name", value: null },
customerId: { op: 'Equal', value: null } customerId: { op: "Equal", value: null }
}, },
addModal: false, addModal: false,
editModal: false, editModal: false,
...@@ -139,110 +139,110 @@ export default { ...@@ -139,110 +139,110 @@ export default {
deletelModal: false, deletelModal: false,
curId: 0, curId: 0,
customerId: 0, customerId: 0,
columns: [{ key: 'id', title: this.l('id'), hide: true, align: 'left' }], columns: [{ key: "id", title: this.l("id"), hide: true, align: "left" }],
name: '', name: "",
getlists: { getlists: {
conditions: [ conditions: [
{ {
fieldName: '', fieldName: "",
fieldValue: '', fieldValue: "",
conditionalType: 'Equal' conditionalType: "Equal"
} }
], ],
pageSize: 1000 pageSize: 1000
} }
} };
}, },
computed: { computed: {
projectList() { projectList() {
return this.list.filter((u) => { return this.list.filter(u => {
return u.name.indexOf(this.keys) > -1 return u.name.indexOf(this.keys) > -1;
}) });
} }
}, },
mounted() { mounted() {
this.getList() this.getList();
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
clickSearch() { clickSearch() {
this.getlists.conditions[0].fieldName = 'name' this.getlists.conditions[0].fieldName = "name";
this.getlists.conditions[0].fieldValue = this.name this.getlists.conditions[0].fieldValue = this.name;
this.getList() this.getList();
}, },
listData(li, index) { listData(li, index) {
this.easySearch.customerId.value = li.id this.easySearch.customerId.value = li.id;
this.isactive = index this.isactive = index;
this.customerId = li.id this.customerId = li.id;
this.search() this.search();
}, },
getList() { getList() {
Api.list(this.getlists).then((r) => { Api.list(this.getlists).then(r => {
if (r.success) { if (r.success) {
this.list = r.result this.list = r.result;
// this.easySearch.customerId.value = r.result[0].id // this.easySearch.customerId.value = r.result[0].id
this.search() this.search();
} }
}) });
}, },
easySearchs() {}, easySearchs() {},
addOk() { addOk() {
this.$refs.grid.load() this.$refs.grid.load();
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.curId = 0 this.curId = 0;
}, },
add() { add() {
if (this.isactive !== null) { if (this.isactive !== null) {
this.addModal = true this.addModal = true;
} else { } else {
this.$Message.info('请选择企业') this.$Message.info("请选择企业");
} }
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch);
}, },
detail(id) { detail(id) {
this.detailModal = true this.detailModal = true;
this.curId = id this.curId = id;
}, },
edit(id) { edit(id) {
this.editModal = true this.editModal = true;
this.curId = id this.curId = id;
}, },
remove(id) { remove(id) {
this.deletelModal = true this.deletelModal = true;
this.curId = id this.curId = id;
}, },
removeOk() { removeOk() {
Api.delete({ id: this.curId }).then((r) => { Api.delete({ id: this.curId }).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$refs.grid.load();
this.deletelModal = false this.deletelModal = false;
this.$Message.success('删除成功') this.$Message.success("删除成功");
} }
}) });
}, },
removeCancel() { removeCancel() {
this.deletelModal = false this.deletelModal = false;
}, },
cancel() { cancel() {
this.curId = 0 this.curId = 0;
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.deletedlModal = false this.deletedlModal = false;
}, },
l(key) { l(key) {
let vkey = 'Project' + '.' + key let vkey = "Project" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
.addclass { .addclass {
...@@ -254,7 +254,8 @@ export default { ...@@ -254,7 +254,8 @@ export default {
.project-steps { .project-steps {
display: flex; display: flex;
display: -webkit-flex; display: -webkit-flex;
height: 100%; height: 85vh;
overflow: hidden;
border-top: 1px solid #e4e6ed; border-top: 1px solid #e4e6ed;
h4 { h4 {
margin-bottom: 5px; margin-bottom: 5px;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
</template> </template>
<script> <script>
import ProjectList from './projectList.vue' import ProjectList from "./projectList.vue";
export default { export default {
components: { components: {
ProjectList ProjectList
...@@ -21,30 +21,31 @@ export default { ...@@ -21,30 +21,31 @@ export default {
return { return {
current: 0, current: 0,
stage: 1 stage: 1
} };
}, },
methods: { methods: {
next(name) { next(name) {
if (name == 1) { if (name == 1) {
this.current = 0 this.current = 0;
this.stage = 1 this.stage = 1;
} else if (name == 2) { } else if (name == 2) {
this.current = 1 this.current = 1;
this.stage = 2 this.stage = 2;
} else if (name == 3) { } else if (name == 3) {
this.current = 2 this.current = 2;
this.stage = 3 this.stage = 3;
} else if (name == 4) { } else if (name == 4) {
this.current = 3 this.current = 3;
this.stage = 4 this.stage = 4;
} }
} }
} }
} };
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
.sales { .sales {
height: 90%; height: 90%;
padding-top: 8px;
.steps-k { .steps-k {
margin: 10px 30px; margin: 10px 30px;
.title-c { .title-c {
......
...@@ -117,13 +117,13 @@ ...@@ -117,13 +117,13 @@
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Add from './add' import Add from "./add";
import Edit from './edit' import Edit from "./edit";
import Detail from './detail' import Detail from "./detail";
import Search from './search' import Search from "./search";
export default { export default {
name: 'ProjectList', name: "ProjectList",
components: { components: {
Add, Add,
Edit, Edit,
...@@ -134,20 +134,20 @@ export default { ...@@ -134,20 +134,20 @@ export default {
stage: Number stage: Number
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
data() { data() {
return { return {
action: Api.index, action: Api.index,
activeindex: 0, activeindex: 0,
list: [], list: [],
keys: '', keys: "",
name: '', name: "",
status: '', //为空是全部排产,0为未排产;13为已排查; status: "", //为空是全部排产,0为未排产;13为已排查;
partTaskPk: '', //车间 partTaskPk: "", //车间
result: [], result: [],
isactive: null, isactive: null,
selectName: 'all', selectName: "all",
rowResult: {}, rowResult: {},
addId: { addId: {
projectId: 0, projectId: 0,
...@@ -157,148 +157,148 @@ export default { ...@@ -157,148 +157,148 @@ export default {
getSearch: { getSearch: {
conditions: [ conditions: [
{ {
fieldName: 'stage', fieldName: "stage",
fieldValue: '1', fieldValue: "1",
conditionalType: 'Equal' conditionalType: "Equal"
}, },
{ {
fieldName: '', fieldName: "",
fieldValue: '', fieldValue: "",
conditionalType: 'Equal' conditionalType: "Equal"
} }
], ],
pageSize: 1000 pageSize: 1000
}, },
listOperation: [], listOperation: [],
easySearch: { easySearch: {
keys: { op: 'deliverable', value: null }, keys: { op: "deliverable", value: null },
stage: { op: 'Equal', value: null }, stage: { op: "Equal", value: null },
projectId: { op: 'Equal', value: null } projectId: { op: "Equal", value: null }
}, },
addModal: false, addModal: false,
editModal: false, editModal: false,
detailModal: false, detailModal: false,
deletelModal: false, deletelModal: false,
curId: 0, curId: 0,
columns: [{ key: 'id', title: this.l('id'), hide: true, align: 'left' }] columns: [{ key: "id", title: this.l("id"), hide: true, align: "left" }]
} };
}, },
filters: { filters: {
filterFun: function(value) { filterFun: function(value) {
if (value && value.length > 8) { if (value && value.length > 8) {
value = value.substring(0, 8) + '...' value = value.substring(0, 8) + "...";
} }
return value return value;
}, },
filterFun2: function(value) { filterFun2: function(value) {
if (value && value.length > 15) { if (value && value.length > 15) {
value = value.substring(0, 15) + '...' value = value.substring(0, 15) + "...";
} }
return value return value;
} }
}, },
created() { created() {
this.getList(1) this.getList(1);
}, },
computed: { computed: {
productList() { productList() {
return this.list.filter((u) => { return this.list.filter(u => {
return u.name.indexOf(this.keys) > -1 return u.name.indexOf(this.keys) > -1;
}) });
} }
}, },
methods: { methods: {
clickSearch() { clickSearch() {
this.getSearch.conditions[1].fieldName = 'name' this.getSearch.conditions[1].fieldName = "name";
this.getSearch.conditions[1].fieldValue = this.name this.getSearch.conditions[1].fieldValue = this.name;
this.getList(this.getSearch.conditions[0].fieldValue) this.getList(this.getSearch.conditions[0].fieldValue);
}, },
getList(v) { getList(v) {
this.getSearch.conditions[0].fieldValue = v + '' this.getSearch.conditions[0].fieldValue = v + "";
Api.pagedList(this.getSearch).then((r) => { Api.pagedList(this.getSearch).then(r => {
if (r.success) { if (r.success) {
this.list = r.result this.list = r.result;
this.search() this.search();
} }
}) });
}, },
listData(li, index) { listData(li, index) {
this.easySearch.projectId.value = li.id this.easySearch.projectId.value = li.id;
this.easySearch.stage.value = li.stage this.easySearch.stage.value = li.stage;
this.$refs.add.entity.stage = li.stage this.$refs.add.entity.stage = li.stage;
this.addId.projectId = li.id this.addId.projectId = li.id;
this.addId.customerId = li.customerId this.addId.customerId = li.customerId;
this.addId.principal = li.principal this.addId.principal = li.principal;
this.isactive = index this.isactive = index;
this.search() this.search();
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch);
}, },
addOk() { addOk() {
this.$refs.grid.load() this.$refs.grid.load();
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.curId = 0 this.curId = 0;
}, },
add() { add() {
if (this.isactive !== null) { if (this.isactive !== null) {
this.addModal = true this.addModal = true;
} else { } else {
this.$Message.info('请选择项目') this.$Message.info("请选择项目");
} }
}, },
detail(id) { detail(id) {
this.detailModal = true this.detailModal = true;
this.curId = id this.curId = id;
}, },
edit(id) { edit(id) {
this.editModal = true this.editModal = true;
this.curId = id this.curId = id;
}, },
remove(id) { remove(id) {
this.deletelModal = true this.deletelModal = true;
this.curId = id this.curId = id;
}, },
removeOk() { removeOk() {
Api.delete({ id: this.curId }).then((r) => { Api.delete({ id: this.curId }).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$refs.grid.load();
this.deletelModal = false this.deletelModal = false;
this.$Message.success('删除成功') this.$Message.success("删除成功");
} }
}) });
}, },
removeCancel() { removeCancel() {
this.deletelModal = false this.deletelModal = false;
}, },
cancel() { cancel() {
this.curId = 0 this.curId = 0;
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.deletedlModal = false this.deletedlModal = false;
}, },
l(key) { l(key) {
let vkey = 'Follow' + '.' + key let vkey = "Follow" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
}, },
watch: { watch: {
stage(v) { stage(v) {
this.getList(v) this.getList(v);
}, },
'easySearch.projectId.value'(v) { "easySearch.projectId.value"(v) {
if (v) { if (v) {
this.search() this.search();
} }
} }
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.addclass { .addclass {
...@@ -310,7 +310,8 @@ export default { ...@@ -310,7 +310,8 @@ export default {
.steps { .steps {
display: flex; display: flex;
display: -webkit-flex; display: -webkit-flex;
height: 100%; height: 80vh;
overflow: hidden;
border-top: 1px solid #e4e6ed; border-top: 1px solid #e4e6ed;
h4 { h4 {
margin-bottom: 5px; margin-bottom: 5px;
......
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