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

样式

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