Commit 4d9b4de9 authored by CenXinYi's avatar CenXinYi

实现样品库出入记录排序功能

Signed-off-by: 's avatarCenXinYi <2810162984@qq.com>
parent afc9b993
...@@ -432,7 +432,6 @@ export default { ...@@ -432,7 +432,6 @@ export default {
/** TODO:查询工序库的出入库记录列表 */ /** TODO:查询工序库的出入库记录列表 */
getList() { getList() {
this.loading = true this.loading = true
console.log('66666')
listLog(this.queryParams, this.addDateRange(this.queryEntity, this.dateRange)).then(response => { listLog(this.queryParams, this.addDateRange(this.queryEntity, this.dateRange)).then(response => {
this.inventoryRecordList = response.rows this.inventoryRecordList = response.rows
this.total = response.total this.total = response.total
......
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
:key="queryParams.rows" :key="queryParams.rows"
:all-table-arguments="allTableArguments" :all-table-arguments="allTableArguments"
@handle-detail="handleDetail" @handle-detail="handleDetail"
@change-table-sort="changeTableSort"
/> />
</transition> </transition>
<!--TODO: 分页组件--> <!--TODO: 分页组件-->
...@@ -118,8 +119,8 @@ ...@@ -118,8 +119,8 @@
<el-form-item label="lot:" prop="lot"> <el-form-item label="lot:" prop="lot">
<el-input v-model.trim="singleDetails.lot" :readonly="isReadOnly" /> <el-input v-model.trim="singleDetails.lot" :readonly="isReadOnly" />
</el-form-item> </el-form-item>
<el-form-item label="plocation:" prop="plocation"> <el-form-item label="unit:" prop="unit">
<el-input v-model.trim="singleDetails.plocation" :readonly="isReadOnly" /> <el-input v-model.trim="singleDetails.unit" :readonly="isReadOnly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -127,8 +128,11 @@ ...@@ -127,8 +128,11 @@
<el-form-item label="库类型:" prop="ptype"> <el-form-item label="库类型:" prop="ptype">
{{ selectedPtype(singleDetails.ptype) }} {{ selectedPtype(singleDetails.ptype) }}
</el-form-item> </el-form-item>
<el-form-item label="库状态:" prop="poperate"> <el-form-item label="qty:" prop="qty">
{{ selectedPoperate(singleDetails.poperate) }} {{ selectedPtype(singleDetails.qty) }}
</el-form-item>
<el-form-item label="memo:" prop="memo">
<el-input v-model.trim="singleDetails.memo" :readonly="isReadOnly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -234,6 +238,9 @@ export default { ...@@ -234,6 +238,9 @@ export default {
rows: 10 rows: 10
}, },
queryEntity: { queryEntity: {
// TODO: 0表示倒序排序,1表示顺序排序
tableSortMark: 0,
entity: { entity: {
// TODO: 设备编码 // TODO: 设备编码
pn: '', pn: '',
...@@ -304,6 +311,7 @@ export default { ...@@ -304,6 +311,7 @@ export default {
{ {
time: true, time: true,
prop: 'createDate', prop: 'createDate',
sortable: 'custom',
label: '操作时间', label: '操作时间',
align: 'center' align: 'center'
}, },
...@@ -430,6 +438,18 @@ export default { ...@@ -430,6 +438,18 @@ export default {
this.activateAbandonedState = false this.activateAbandonedState = false
this.singleLogIdAndFqYs = {} this.singleLogIdAndFqYs = {}
}, },
/* TODO: 进行排序 */
changeTableSort: function(val) {
console.log('column', val)
// TODO:按照降序排序
if (val.order === 'descending') {
this.queryEntity.tableSortMark = 0
} else {
// TODO:按照升序排序
this.queryEntity.tableSortMark = 1
}
this.getList()
},
/* TODO: 获取详情信息*/ /* TODO: 获取详情信息*/
handleDetail: function(row) { handleDetail: function(row) {
/* TODO: 如果库状态为‘废弃’,即为‘4’时,则可以进入 */ /* TODO: 如果库状态为‘废弃’,即为‘4’时,则可以进入 */
...@@ -438,6 +458,7 @@ export default { ...@@ -438,6 +458,7 @@ export default {
} else { } else {
/* TODO: 设置单项详情的查询的条件 */ /* TODO: 设置单项详情的查询的条件 */
this.singleLogIdAndFqYs['businessId'] = row.businessId this.singleLogIdAndFqYs['businessId'] = row.businessId
this.singleLogIdAndFqYs['fqYs'] = row.fqYs this.singleLogIdAndFqYs['fqYs'] = row.fqYs
/* TODO: 进行查询,如果返回的code为200,则表示返回的值成功 */ /* TODO: 进行查询,如果返回的code为200,则表示返回的值成功 */
findSingleLogDetail(this.singleLogIdAndFqYs).then( findSingleLogDetail(this.singleLogIdAndFqYs).then(
......
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