|
@@ -72,7 +72,8 @@
|
|
|
<span class="card-content-text">未完工</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div><div class="divider"/>
|
|
|
+ </div>
|
|
|
+ <div class="divider"/>
|
|
|
<div class="content-item" @click="handleClick('4')">
|
|
|
<div class="card">
|
|
|
<div class="card-title card-title6">
|
|
@@ -97,6 +98,8 @@
|
|
|
:option="option"
|
|
|
@on-load="onLoad"
|
|
|
@row-del="rowDel"
|
|
|
+ @resetColumn="resetColumn"
|
|
|
+ @saveColumn="saveColumn"
|
|
|
@search-criteria-switch="searchCriteriaSwitch"
|
|
|
@search-change="searchChange">
|
|
|
<template slot="menuLeft" slot-scope="{size}">
|
|
@@ -104,6 +107,11 @@
|
|
|
<el-button type="success" :size="size" @click="rowSave">复制单据</el-button>
|
|
|
<el-button type="info" :size="size" icon="el-icon-printer" @click="rowSave">报表</el-button>
|
|
|
</template>
|
|
|
+ <template slot="corpNameSearch" slot-scope="{ row,index}">
|
|
|
+ <crop-select
|
|
|
+ v-model="row.corpId"
|
|
|
+ ></crop-select>
|
|
|
+ </template>
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
|
<el-button type="text"
|
|
|
icon="el-icon-edit"
|
|
@@ -113,6 +121,7 @@
|
|
|
<el-button type="text"
|
|
|
icon="el-icon-delete"
|
|
|
size="small"
|
|
|
+ v-if="row.status < 1"
|
|
|
@click.stop="$refs.crud.rowDel(row,index)">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -145,7 +154,8 @@ export default {
|
|
|
total: 0,
|
|
|
pageSizes: [10, 50, 100, 200, 300]
|
|
|
},
|
|
|
- option: {
|
|
|
+ option: {},
|
|
|
+ optionList: {
|
|
|
align: 'center',
|
|
|
index: true,
|
|
|
addBtn: false,
|
|
@@ -163,7 +173,7 @@ export default {
|
|
|
}, {
|
|
|
label: '订单号',
|
|
|
prop: 'id',
|
|
|
- index: 1,
|
|
|
+ index: 2,
|
|
|
overHidden: true,
|
|
|
width: 160,
|
|
|
search: true,
|
|
@@ -171,20 +181,20 @@ export default {
|
|
|
label: '客户名称',
|
|
|
prop: 'corpName',
|
|
|
overHidden: true,
|
|
|
- index: 1,
|
|
|
+ index: 3,
|
|
|
width: 140,
|
|
|
search: true,
|
|
|
}, {
|
|
|
label: '所属公司',
|
|
|
prop: 'belongCompany',
|
|
|
overHidden: true,
|
|
|
- index: 1,
|
|
|
+ index: 4,
|
|
|
width: 140,
|
|
|
search: true,
|
|
|
}, {
|
|
|
label: '提单号',
|
|
|
prop: 'billNo',
|
|
|
- index: 1,
|
|
|
+ index: 5,
|
|
|
overHidden: true,
|
|
|
width: 140,
|
|
|
search: true,
|
|
@@ -192,49 +202,62 @@ export default {
|
|
|
label: '货物名称',
|
|
|
prop: 'goods',
|
|
|
overHidden: true,
|
|
|
- index: 1,
|
|
|
+ index: 6,
|
|
|
width: 140,
|
|
|
search: true,
|
|
|
}, {
|
|
|
label: '路线',
|
|
|
prop: 'id',
|
|
|
overHidden: true,
|
|
|
- index: 1,
|
|
|
+ index: 7,
|
|
|
width: 140,
|
|
|
search: true,
|
|
|
}, {
|
|
|
label: '场站',
|
|
|
prop: 'station',
|
|
|
overHidden: true,
|
|
|
- index: 1,
|
|
|
- width: 140,
|
|
|
- search: true,
|
|
|
- }, {
|
|
|
- label: '到厂时间',
|
|
|
- prop: 'arrivalTime',
|
|
|
- overHidden: true,
|
|
|
- index: 1,
|
|
|
+ index: 8,
|
|
|
width: 140,
|
|
|
search: true,
|
|
|
- }, {
|
|
|
- label: '工厂名称',
|
|
|
- prop: 'factory',
|
|
|
- overHidden: true,
|
|
|
- index: 1,
|
|
|
- width: 140,
|
|
|
- search: true,
|
|
|
- }, {
|
|
|
- label: '制单日期',
|
|
|
- overHidden: true,
|
|
|
- prop: 'createTime',
|
|
|
- index: 1,
|
|
|
- width: 140,
|
|
|
- search: true,
|
|
|
- }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '到厂时间',
|
|
|
+ prop: 'arrivalTime',
|
|
|
+ overHidden: true,
|
|
|
+ type: "date",
|
|
|
+ searchRange: true,
|
|
|
+ unlinkPanels: true,
|
|
|
+ defaultTime: ['00:00:00', '23:59:59'],
|
|
|
+ format: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ index: 9,
|
|
|
+ width: 140,
|
|
|
+ search: true,
|
|
|
+ }, {
|
|
|
+ label: '工厂名称',
|
|
|
+ prop: 'factory',
|
|
|
+ overHidden: true,
|
|
|
+ index: 10,
|
|
|
+ width: 140,
|
|
|
+ search: true,
|
|
|
+ }, {
|
|
|
+ label: '制单日期',
|
|
|
+ overHidden: true,
|
|
|
+ prop: 'createTime',
|
|
|
+ type: "date",
|
|
|
+ searchRange: true,
|
|
|
+ defaultTime: ['00:00:00', '23:59:59'],
|
|
|
+ format: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ index: 11,
|
|
|
+ width: 140,
|
|
|
+ search: true,
|
|
|
+ }]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ async created() {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(85), this.optionList);
|
|
|
let i = 0;
|
|
|
this.option.column.forEach(item => {
|
|
|
if (item.search) i++
|
|
@@ -246,12 +269,35 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumn() {
|
|
|
+ /**
|
|
|
+ * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
|
|
|
+ * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
|
|
|
+ * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
|
|
|
+ */
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(85), this.option);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumn() {
|
|
|
+ this.option = this.optionList;
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(85), this.optionList);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获得高度
|
|
|
searchCriteriaSwitch(type) {
|
|
|
if (type) {
|
|
|
- this.option.height = this.option.height - 240
|
|
|
+ this.option.height = this.option.height - 138
|
|
|
} else {
|
|
|
- this.option.height = this.option.height + 240
|
|
|
+ this.option.height = this.option.height + 138
|
|
|
}
|
|
|
this.$refs.crud.getTableHeight()
|
|
|
},
|
|
@@ -272,14 +318,25 @@ export default {
|
|
|
selectInvoiceList(queryParams).then(res => {
|
|
|
this.dataList = res.data.data.records
|
|
|
this.page.total = res.data.data.total
|
|
|
- this.option.height = window.innerHeight - 240;
|
|
|
+ this.option.height = window.innerHeight - 370;
|
|
|
}).finally(() => {
|
|
|
this.loading = false;
|
|
|
})
|
|
|
},
|
|
|
//搜索
|
|
|
searchChange(params, done) {
|
|
|
- this.onLoad(this.page, params)
|
|
|
+ let data = params
|
|
|
+ if (params.arrivalTime) {
|
|
|
+ data.beginArrivalTime = params.arrivalTime[0]
|
|
|
+ data.endArrivalTime = params.arrivalTime[1]
|
|
|
+ }
|
|
|
+ if (params.createTime) {
|
|
|
+ data.beginCrateTime = params.createTime[0]
|
|
|
+ data.endCrateTime = params.createTime[1]
|
|
|
+ }
|
|
|
+ delete data.arrivalTime
|
|
|
+ delete data.createTime
|
|
|
+ this.onLoad(this.page, data)
|
|
|
done();
|
|
|
},
|
|
|
//列表删除
|
|
@@ -428,10 +485,12 @@ export default {
|
|
|
color: #42bc6f;
|
|
|
background-color: rgba(66, 188, 111, 0.15);
|
|
|
}
|
|
|
+
|
|
|
&-title5 {
|
|
|
color: #14cde1;
|
|
|
background-color: rgba(52, 149, 161, 0.15);
|
|
|
}
|
|
|
+
|
|
|
&-title6 {
|
|
|
color: rgba(4, 66, 31, 0.63);
|
|
|
background-color: rgba(66, 188, 111, 0.15);
|