管理端 订单发货状态
parent
2069a4cdeb
commit
837098a3d2
|
@ -43,6 +43,15 @@ export function refundRechargeOrder(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 发货状态更改
|
||||
export function updateByIds(query) {
|
||||
return request({
|
||||
url: '/shop/recharge-order/updateByIds',
|
||||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得订单分页
|
||||
export function getRechargeOrderPage(query) {
|
||||
return request({
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
<el-form-item label="充值号码" prop="userPhone">
|
||||
<el-input v-model="queryParams.userPhone" placeholder="请输入充值号码" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择发货状态" clearable @keyup.enter.native="handleQuery">
|
||||
<el-option value="0" label="未发货"/>
|
||||
<el-option value="1" label="已发货"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付状态" prop="userPhone">
|
||||
<el-select v-model="queryParams.paid" placeholder="请选择支付状态" clearable style="width: 240px">
|
||||
<el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label" :value="parseInt(dict.value)"/>
|
||||
|
@ -43,11 +49,23 @@
|
|||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
||||
v-hasPermi="['shop:recharge-order:export']">导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-edit" size="mini" @click="handleGoods"
|
||||
>批量更新发货状态</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table v-loading="loading" :data="list" ref="multipleTable" >
|
||||
<el-table-column
|
||||
width="55">
|
||||
<template v-slot="scope">
|
||||
<el-checkbox v-model="scope.row.bool" :disabled="scope.row.status" @change="((value)=>{
|
||||
handleChange(value,scope.row)
|
||||
})"></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单编号" align="center" prop="orderId" />
|
||||
<el-table-column label="交易流水号" align="center" prop="paySerialNumber" />
|
||||
<el-table-column label="订单支付时间" align="center" prop="payTime" width="180">
|
||||
|
@ -67,6 +85,11 @@
|
|||
<el-table-column label="确认号码" align="center" prop="confirmPhone" />
|
||||
<el-table-column label="订单总价(元)" align="center" prop="totalPrice" />
|
||||
<el-table-column label="实际金额(元)" align="center" prop="payPrice" />
|
||||
<el-table-column label="发货状态" align="center" prop="status" >
|
||||
<template v-slot="scope">
|
||||
<div>{{scope.row.status? "已发货" : "未发货"}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付方式" align="center" prop="payType" >
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.PAY_TYPE" :value="scope.row.payType"/>
|
||||
|
@ -117,6 +140,7 @@ import {
|
|||
updateRechargeOrder,
|
||||
deleteRechargeOrder,
|
||||
getRechargeOrder,
|
||||
updateByIds,
|
||||
getRechargeOrderPage,
|
||||
exportRechargeOrderExcel,
|
||||
refundRechargeOrder
|
||||
|
@ -214,13 +238,42 @@ export default {
|
|||
proTotalPrice: [{ required: true, message: "商品总价不能为空", trigger: "blur" }],
|
||||
beforePayPrice: [{ required: true, message: "改价前支付金额不能为空", trigger: "blur" }],
|
||||
isAlterPrice: [{ required: true, message: "是否改价,0-否,1-是不能为空", trigger: "blur" }],
|
||||
}
|
||||
},
|
||||
multipleSelection: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleChange(bool, value){
|
||||
if(bool){
|
||||
this.multipleSelection.push(value.id)
|
||||
}else {
|
||||
this.multipleSelection.splice(this.multipleSelection.indexOf(value.id),1)
|
||||
}
|
||||
},
|
||||
async handleGoods(){
|
||||
if(this.multipleSelection.length){
|
||||
await updateByIds({ids:this.multipleSelection,status:true})
|
||||
this.getList();
|
||||
}else {
|
||||
this.$modal.msgWarning("请勾选需要更改发货状态的订单")
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
if(!this.multipleSelection.length){
|
||||
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.multipleSelection = arr.map(item => item.id)
|
||||
arr.forEach(row => {
|
||||
this.$refs.multipleTable.toggleRowSelection(row);
|
||||
});
|
||||
}else {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.multipleSelection = []
|
||||
}
|
||||
},
|
||||
handleReview(row, status){
|
||||
|
||||
},
|
||||
|
@ -229,7 +282,13 @@ export default {
|
|||
this.loading = true;
|
||||
// 执行查询
|
||||
getRechargeOrderPage(this.queryParams).then(response => {
|
||||
this.list = response.data.list;
|
||||
const arr = response.data.list.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
bool:item.status
|
||||
}
|
||||
})
|
||||
this.list = arr;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue