|
@@ -1,23 +1,27 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <FullPage title='项目进度表'
|
|
|
|
- :list='list'
|
|
|
|
- @init='init'
|
|
|
|
- :loading='loading'
|
|
|
|
- @searchData='init'
|
|
|
|
- @changePage='changePage'
|
|
|
|
- @changeSize='changeSize'
|
|
|
|
- :tableColums='tableColums'
|
|
|
|
- :tableData='tableData'
|
|
|
|
- :pageIndex='pageIndex'
|
|
|
|
- :total='total'>
|
|
|
|
- <template slot="basicTypeSet"
|
|
|
|
- slot-scope="{row}">
|
|
|
|
|
|
+ <FullPage
|
|
|
|
+ title="项目进度表"
|
|
|
|
+ :list="list"
|
|
|
|
+ @init="init"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ @searchData="init"
|
|
|
|
+ @changePage="changePage"
|
|
|
|
+ @changeSize="changeSize"
|
|
|
|
+ :tableColums="tableColums"
|
|
|
|
+ :tableData="tableData"
|
|
|
|
+ :pageIndex="pageIndex"
|
|
|
|
+ :total="total"
|
|
|
|
+ >
|
|
|
|
+ <template slot="basicTypeSet" slot-scope="{ row }">
|
|
<div>
|
|
<div>
|
|
- <span v-for="item in warningList"
|
|
|
|
- :key="item.id"
|
|
|
|
- :style="{color:item.color}"
|
|
|
|
- v-show="item.id==row.warning_state">{{item.title}}</span>
|
|
|
|
|
|
+ <span
|
|
|
|
+ v-for="item in warningList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :style="{ color: item.color }"
|
|
|
|
+ v-show="item.id == row.warning_state"
|
|
|
|
+ >{{ item.title }}</span
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</FullPage>
|
|
</FullPage>
|
|
@@ -26,75 +30,144 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
- data () {
|
|
|
|
|
|
+ data() {
|
|
return {
|
|
return {
|
|
list: [
|
|
list: [
|
|
- { title: '项目名称', name: 'Input', value: '', serverName: 'residential_name', placeholder: '项目名称' },
|
|
|
|
- { title: '订单编号', name: 'Input', value: '', serverName: 'order_no', placeholder: '订单编号' },
|
|
|
|
|
|
+ {
|
|
|
|
+ title: "项目名称",
|
|
|
|
+ name: "Input",
|
|
|
|
+ value: "",
|
|
|
|
+ serverName: "residential_name",
|
|
|
|
+ placeholder: "项目名称",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "订单编号",
|
|
|
|
+ name: "Input",
|
|
|
|
+ value: "",
|
|
|
|
+ serverName: "order_no",
|
|
|
|
+ placeholder: "订单编号",
|
|
|
|
+ },
|
|
],
|
|
],
|
|
tableColums: [
|
|
tableColums: [
|
|
- { title: '订单编号', align: 'center', key: 'order_no', minWidth: 200 },
|
|
|
|
|
|
+ { title: "订单编号", align: "center", key: "order_no", minWidth: 200 },
|
|
{
|
|
{
|
|
- title: '订单类型', align: 'center', key: 'renovation_type', minWidth: 100,
|
|
|
|
- render: (h, params) => h('span', {}, params.row.renovation_type == 1 ? '工装' : '家装')
|
|
|
|
|
|
+ title: "订单类型",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "renovation_type",
|
|
|
|
+ minWidth: 100,
|
|
|
|
+ render: (h, params) =>
|
|
|
|
+ h("span", {}, params.row.renovation_type == 1 ? "工装" : "家装"),
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '订单状态', align: 'center', key: 'state', minWidth: 150,
|
|
|
|
- render: (h, params) => h('span', {},
|
|
|
|
- params.row.state == 0 ? '测量未审核'
|
|
|
|
- : (params.row.state == 1 ? '测量审核'
|
|
|
|
- : (params.row.state == 2 ? '测量通过'
|
|
|
|
- : (params.row.state == 3 ? '生产审核中'
|
|
|
|
- : (params.row.state == 4 ? '生产通过'
|
|
|
|
- : (params.row.state == 5 ? '到生产计划' : '完成')))))
|
|
|
|
- )
|
|
|
|
|
|
+ title: "订单状态",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "state",
|
|
|
|
+ minWidth: 150,
|
|
|
|
+ render: (h, params) =>
|
|
|
|
+ h(
|
|
|
|
+ "span",
|
|
|
|
+ {},
|
|
|
|
+ params.row.state == 0
|
|
|
|
+ ? "测量未审核"
|
|
|
|
+ : params.row.state == 1
|
|
|
|
+ ? "测量审核"
|
|
|
|
+ : params.row.state == 2
|
|
|
|
+ ? "测量通过"
|
|
|
|
+ : params.row.state == 3
|
|
|
|
+ ? "生产审核中"
|
|
|
|
+ : params.row.state == 4
|
|
|
|
+ ? "生产通过"
|
|
|
|
+ : params.row.state == 5
|
|
|
|
+ ? "到生产计划"
|
|
|
|
+ : "完成"
|
|
|
|
+ ),
|
|
},
|
|
},
|
|
- { title: '业务员', align: 'center', key: 'salesman', minWidth: 150 },
|
|
|
|
- { title: '紧急程度', align: 'center', key: 'warning_state', minWidth: 100, slot: 'basicTypeSet', },
|
|
|
|
|
|
+ { title: "业务员", align: "center", key: "salesman", minWidth: 150 },
|
|
{
|
|
{
|
|
- title: '订单创建时间', align: 'center', minWidth: 180, key: 'crt_time',
|
|
|
|
- render: (h, params) => h('span', {}, this.func.replaceDate(params.row.crt_time))
|
|
|
|
|
|
+ title: "紧急程度",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "warning_state",
|
|
|
|
+ minWidth: 100,
|
|
|
|
+ slot: "basicTypeSet",
|
|
},
|
|
},
|
|
- { title: '项目名称', align: 'center', key: 'residential_name', minWidth: 200 },
|
|
|
|
{
|
|
{
|
|
- title: '订单开始日期', align: 'center', minWidth: 180, key: 'start_time',
|
|
|
|
- render: (h, params) => h('span', {}, this.func.replaceDate(params.row.start_time, 1))
|
|
|
|
|
|
+ title: "订单创建时间",
|
|
|
|
+ align: "center",
|
|
|
|
+ minWidth: 180,
|
|
|
|
+ key: "crt_time",
|
|
|
|
+ render: (h, params) =>
|
|
|
|
+ h("span", {}, this.func.replaceDate(params.row.crt_time)),
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '订单交付日期', align: 'center', minWidth: 180, key: 'end_time',
|
|
|
|
- render: (h, params) => h('span', {}, this.func.replaceDate(params.row.end_time, 1))
|
|
|
|
|
|
+ title: "项目名称",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "residential_name",
|
|
|
|
+ minWidth: 200,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '生产进度', align: 'center', key: 'complete_rate', minWidth: 180,
|
|
|
|
- render (h, params) {
|
|
|
|
- return h('span', {}, parseInt(params.row.complete_rate * 100) + '%')
|
|
|
|
|
|
+ title: "订单开始日期",
|
|
|
|
+ align: "center",
|
|
|
|
+ minWidth: 180,
|
|
|
|
+ key: "start_time",
|
|
|
|
+ render: (h, params) =>
|
|
|
|
+ h("span", {}, this.func.replaceDate(params.row.start_time, 1)),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "订单交付日期",
|
|
|
|
+ align: "center",
|
|
|
|
+ minWidth: 180,
|
|
|
|
+ key: "end_time",
|
|
|
|
+ render: (h, params) =>
|
|
|
|
+ h("span", {}, this.func.replaceDate(params.row.end_time, 1)),
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: "生产进度",
|
|
|
|
+ align: "center",
|
|
|
|
+ key: "complete_rate",
|
|
|
|
+ minWidth: 180,
|
|
|
|
+ render(h, params) {
|
|
|
|
+ return h(
|
|
|
|
+ "span",
|
|
|
|
+ {},
|
|
|
|
+ parseInt(params.row.complete_rate * 100) + "%"
|
|
|
|
+ );
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '预估交付日期', align: 'center', minWidth: 200, key: 'predict_time',
|
|
|
|
- render: (h, params) => h('span', {}, this.func.replaceDate(params.row.predict_time, 1))
|
|
|
|
|
|
+ title: "预估交付日期",
|
|
|
|
+ align: "center",
|
|
|
|
+ minWidth: 200,
|
|
|
|
+ key: "predict_time",
|
|
|
|
+ render: (h, params) =>
|
|
|
|
+ h("span", {}, this.func.replaceDate(params.row.predict_time, 1)),
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '操作', align: 'center', minWidth: 100,
|
|
|
|
|
|
+ title: "操作",
|
|
|
|
+ align: "center",
|
|
|
|
+ minWidth: 100,
|
|
render: (h, params) => {
|
|
render: (h, params) => {
|
|
- const { row } = params
|
|
|
|
- return h('Button', {
|
|
|
|
- props: {
|
|
|
|
- type: 'primary',
|
|
|
|
- size: 'small'
|
|
|
|
|
|
+ const { row } = params;
|
|
|
|
+ return h(
|
|
|
|
+ "Button",
|
|
|
|
+ {
|
|
|
|
+ props: {
|
|
|
|
+ type: "primary",
|
|
|
|
+ size: "small",
|
|
|
|
+ },
|
|
|
|
+ on: {
|
|
|
|
+ click: () => {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/cms/projectprogressmannage/detail",
|
|
|
|
+ query: {
|
|
|
|
+ order_no: row.code,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- on: {
|
|
|
|
- click: () => {
|
|
|
|
- this.$router.push({
|
|
|
|
- path: '/cms/projectprogressmannage/detail',
|
|
|
|
- query: {
|
|
|
|
- order_no: row.code
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }, '详情')
|
|
|
|
- }
|
|
|
|
|
|
+ "详情"
|
|
|
|
+ );
|
|
|
|
+ },
|
|
},
|
|
},
|
|
],
|
|
],
|
|
tableData: [],
|
|
tableData: [],
|
|
@@ -104,40 +177,50 @@ export default {
|
|
proxyObj: {},
|
|
proxyObj: {},
|
|
loading: false,
|
|
loading: false,
|
|
warningList: [],
|
|
warningList: [],
|
|
- }
|
|
|
|
|
|
+ };
|
|
},
|
|
},
|
|
- created () {
|
|
|
|
|
|
+ created() {
|
|
// 获取紧急程度
|
|
// 获取紧急程度
|
|
- this.axios.get('/api/warning_list').then(res => { this.warningList = res.data.data })
|
|
|
|
|
|
+ this.axios.get("/api/warning_list").then((res) => {
|
|
|
|
+ this.warningList = res.data.data;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- init (row) {
|
|
|
|
- this.pageIndex = 1
|
|
|
|
|
|
+ init(row) {
|
|
|
|
+ this.pageIndex = 1;
|
|
row.page_index = this.pageIndex;
|
|
row.page_index = this.pageIndex;
|
|
row.page_size = this.pageSize;
|
|
row.page_size = this.pageSize;
|
|
- this.proxyObj = row
|
|
|
|
- this.getData(row)
|
|
|
|
|
|
+ this.proxyObj = row;
|
|
|
|
+ this.getData(row);
|
|
},
|
|
},
|
|
- getData (row) {
|
|
|
|
|
|
+ getData(row) {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- this.axios('/api/projectprogress/list', { params: row }).then(res => {
|
|
|
|
- this.loading = false
|
|
|
|
|
|
+ this.axios("/api/projectprogress/list", { params: row }).then((res) => {
|
|
|
|
+ this.loading = false;
|
|
this.tableData = res.data.data;
|
|
this.tableData = res.data.data;
|
|
this.total = res.data.total || 0;
|
|
this.total = res.data.total || 0;
|
|
- })
|
|
|
|
|
|
+ });
|
|
},
|
|
},
|
|
- changePage (e) {
|
|
|
|
|
|
+ changePage(e) {
|
|
this.pageIndex = e;
|
|
this.pageIndex = e;
|
|
this.proxyObj.page_index = this.pageIndex;
|
|
this.proxyObj.page_index = this.pageIndex;
|
|
- this.getData(this.proxyObj)
|
|
|
|
|
|
+ this.getData(this.proxyObj);
|
|
},
|
|
},
|
|
- changeSize (e) {
|
|
|
|
|
|
+ changeSize(e) {
|
|
this.pageSize = e;
|
|
this.pageSize = e;
|
|
this.proxyObj.page_size = this.pageSize;
|
|
this.proxyObj.page_size = this.pageSize;
|
|
- this.getData(this.proxyObj)
|
|
|
|
|
|
+ this.getData(this.proxyObj);
|
|
},
|
|
},
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+ },
|
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
|
+ if (to.path == "/cms/projectprogressmannage/detail") {
|
|
|
|
+ next();
|
|
|
|
+ } else {
|
|
|
|
+ from.meta.keepAlive = false;
|
|
|
|
+ next();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|