订单组织树

This commit is contained in:
zzyuan 2025-03-19 18:46:40 +08:00
parent f569800226
commit 5c13b2161e
8 changed files with 63 additions and 102 deletions

View File

@ -78,17 +78,6 @@ export function queryPsnTypeByPageApi(data) {
params: data params: data
}) })
} }
// 组织
export function custOrgTreeApi(data) {
return request({
url: '/smart-canteen/custOrg/tenant/tree',
method: 'get',
headers: {
"merchant-id":"378915229716713472",
},
params: data
})
}

View File

@ -102,17 +102,6 @@ export function queryPsnTypeByPageApi(data) {
params: data params: data
}) })
} }
// 组织
export function custOrgTreeApi(data) {
return request({
url: '/smart-canteen/custOrg/tenant/tree',
method: 'get',
headers: {
"merchant-id":"378915229716713472",
},
params: data
})
}
// 订单列表-分页 // 订单列表-分页
export function orderPageListApi(data) { export function orderPageListApi(data) {

View File

@ -110,17 +110,6 @@ export function queryPsnTypeByPageApi(data) {
params: data params: data
}) })
} }
// 组织
export function custOrgTreeApi(data) {
return request({
url: '/smart-canteen/custOrg/tenant/tree',
method: 'get',
headers: {
"merchant-id":"378915229716713472",
},
params: data
})
}
// 退款状态下拉 // 退款状态下拉
export function orderRefundStateListApi(data) { export function orderRefundStateListApi(data) {

View File

@ -115,17 +115,6 @@ export function queryPsnTypeByPageApi(data) {
params: data params: data
}) })
} }
// 组织
export function custOrgTreeApi(data) {
return request({
url: '/smart-canteen/custOrg/tenant/tree',
method: 'get',
headers: {
"merchant-id":"378915229716713472",
},
params: data
})
}
// 订单列表-分页 // 订单列表-分页
export function orderPageListApi(data) { export function orderPageListApi(data) {

View File

@ -123,17 +123,17 @@
<el-form-item label="流水号"> <el-form-item label="流水号">
<el-input v-model="queryParams.mealCode" placeholder="请输入流水号" maxlength="20" clearable style="width: 220px"/> <el-input v-model="queryParams.mealCode" placeholder="请输入流水号" maxlength="20" clearable style="width: 220px"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="所属区域" prop="orgIdList"> <el-form-item label="所属组织" prop="orgIdList">
<el-cascader v-model="queryParams.orgIdList" <el-cascader v-model="queryParams.orgIdList"
:options="treeOrgOptions" :filterable="true" style="width: 220px" :show-all-levels="false" :options="deptOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{ :props="{
multiple: true, multiple: true,
emitPath: false,// falseid emitPath: false,// falseid
checkStrictly: true,// checkStrictly: false,//
value:'id',label:'text' value:'id',label:'label'
}" clearable> }" clearable collapse-tags >
</el-cascader> </el-cascader>
</el-form-item> --> </el-form-item>
<el-form-item> <el-form-item>
@ -527,7 +527,8 @@
</template> </template>
<script> <script>
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi,orderStateListApi,orderPayAllTypeApi,queryPsnTypeByPageApi,orderNuclearModeListApi,custOrgTreeApi} from "@/api/order/offline"; import { deptTreeSelect } from '@/api/system/user'
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi,orderStateListApi,orderPayAllTypeApi,queryPsnTypeByPageApi,orderNuclearModeListApi} from "@/api/order/offline";
import { orderPageListApi,orderDetailInfoApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi,syncOrderPayStateApi } from "@/api/order/offline"; import { orderPageListApi,orderDetailInfoApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi,syncOrderPayStateApi } from "@/api/order/offline";
export default { export default {
@ -587,8 +588,7 @@
orderPayOptions:[], orderPayOptions:[],
nuclearModeOptions:[], nuclearModeOptions:[],
psnTypeOptions:[], psnTypeOptions:[],
// deptOptions:[],//
treeOrgOptions:[],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -644,7 +644,6 @@
this.orderPayAllType(); this.orderPayAllType();
this.orderNuclearModeList(); this.orderNuclearModeList();
this.queryPsnTypeByPage(); this.queryPsnTypeByPage();
// this.getOrgTreeData();//-
this.getList() this.getList()
}, },
methods: { methods: {
@ -696,13 +695,22 @@
this.psnTypeOptions = response.rows this.psnTypeOptions = response.rows
}); });
}, },
//- /** 查询部门下拉树结构 */
getOrgTreeData() { getDeptTree() {
custOrgTreeApi({}).then((response) => { deptTreeSelect().then((response) => {
this.treeOrgOptions = response; this.deptOptions = this.filterTree(response.data)
}); })
},
filterTree(nodes) {
return nodes
.map((node) => {
if (node.children) {
node.children = this.filterTree(node.children)
}
return node
})
.filter((node) => node.status !== '1')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -748,7 +756,7 @@
console.log(this.rowData) console.log(this.rowData)
this.orderDetailList.forEach((item,index)=>{ this.orderDetailList.forEach((item,index)=>{
this.$set(this.orderDetailList[index],"refundNum",item.quantity) this.$set(this.orderDetailList[index],"refundNum",item.quantity)
this.$set(this.orderDetailList[index],"refundMoney",(item.prefPrice).toFixed(2)) this.$set(this.orderDetailList[index],"refundMoney",Number(item.quantity)*(item.prefPrice).toFixed(2))
}) })
this.refundList=[] this.refundList=[]
this.openPart = true; this.openPart = true;

View File

@ -126,17 +126,17 @@
<el-form-item label="流水号"> <el-form-item label="流水号">
<el-input v-model="queryParams.mealCode" placeholder="请输入流水号" maxlength="20" clearable style="width: 220px"/> <el-input v-model="queryParams.mealCode" placeholder="请输入流水号" maxlength="20" clearable style="width: 220px"/>
</el-form-item> </el-form-item>
<!-- <el-form-item label="所属区域" prop="orgIdList"> <el-form-item label="所属组织" prop="orgIdList">
<el-cascader v-model="queryParams.orgIdList" <el-cascader v-model="queryParams.orgIdList"
:options="treeOrgOptions" :filterable="true" style="width: 220px" :show-all-levels="false" :options="deptOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{ :props="{
multiple: true, multiple: true,
emitPath: false,// falseid emitPath: false,// falseid
checkStrictly: true,// checkStrictly: false,//
value:'id',label:'text' value:'id',label:'label'
}" clearable> }" clearable collapse-tags >
</el-cascader> </el-cascader>
</el-form-item> --> </el-form-item>
<el-form-item> <el-form-item>
@ -531,7 +531,8 @@
</template> </template>
<script> <script>
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi,orderStateListApi,orderPayAllTypeApi,queryPsnTypeByPageApi,deliveryTypeListApi,custOrgTreeApi,orderTypeListApi} from "@/api/order/reserve"; import { deptTreeSelect } from '@/api/system/user'
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi,orderStateListApi,orderPayAllTypeApi,queryPsnTypeByPageApi,deliveryTypeListApi,orderTypeListApi} from "@/api/order/reserve";
import { orderPageListApi,orderDetailInfoApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi,syncOrderPayStateApi } from "@/api/order/reserve"; import { orderPageListApi,orderDetailInfoApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi,syncOrderPayStateApi } from "@/api/order/reserve";
export default { export default {
@ -592,8 +593,7 @@ export default {
deliveryTypeOptions:[], deliveryTypeOptions:[],
psnTypeOptions:[], psnTypeOptions:[],
orderTypeOptions:[], orderTypeOptions:[],
// deptOptions:[], //
treeOrgOptions:[],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -649,7 +649,7 @@ export default {
this.deliveryTypeList(); this.deliveryTypeList();
this.queryPsnTypeByPage(); this.queryPsnTypeByPage();
this.orderTypeList(); this.orderTypeList();
// this.getOrgTreeData();//- this.getDeptTree();
this.getList() this.getList()
}, },
methods: { methods: {
@ -707,11 +707,21 @@ export default {
this.orderTypeOptions = response.data; ; this.orderTypeOptions = response.data; ;
}); });
}, },
//- /** 查询部门下拉树结构 */
getOrgTreeData() { getDeptTree() {
custOrgTreeApi({}).then((response) => { deptTreeSelect().then((response) => {
this.treeOrgOptions = response; this.deptOptions = this.filterTree(response.data)
}); })
},
filterTree(nodes) {
return nodes
.map((node) => {
if (node.children) {
node.children = this.filterTree(node.children)
}
return node
})
.filter((node) => node.status !== '1')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
@ -758,7 +768,7 @@ export default {
console.log(this.rowData) console.log(this.rowData)
this.orderDetailList.forEach((item,index)=>{ this.orderDetailList.forEach((item,index)=>{
this.$set(this.orderDetailList[index],"refundNum",item.quantity) this.$set(this.orderDetailList[index],"refundNum",item.quantity)
this.$set(this.orderDetailList[index],"refundMoney",(item.prefPrice).toFixed(2)) this.$set(this.orderDetailList[index],"refundMoney",Number(item.quantity)*(item.prefPrice).toFixed(2))
}) })
this.refundList=[] this.refundList=[]
this.openPart = true; this.openPart = true;

View File

@ -290,7 +290,7 @@
<script> <script>
import { deptTreeSelect } from '@/api/system/user' import { deptTreeSelect } from '@/api/system/user'
import { orderRefundStateListApi,systemAreaTreeApi,getSupermarketByAreaApi,getCanteenByAreaApi,getStallByCanteenApi,orderStateListApi,orderPayAllTypeApi,queryPsnTypeByPageApi,deliveryTypeListApi,custOrgTreeApi,orderTypeListApi} from "@/api/superStore/orderShenhe"; import { orderRefundStateListApi,systemAreaTreeApi,getSupermarketByAreaApi,getCanteenByAreaApi,getStallByCanteenApi,orderStateListApi,orderPayAllTypeApi,queryPsnTypeByPageApi,deliveryTypeListApi,orderTypeListApi} from "@/api/superStore/orderShenhe";
import { refundOrderPageListApi,orderDetailInfoApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi,syncOrderPayStateApi,syncOrderRefundStateApi } from "@/api/superStore/orderShenhe"; import { refundOrderPageListApi,orderDetailInfoApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi,syncOrderPayStateApi,syncOrderRefundStateApi } from "@/api/superStore/orderShenhe";
export default { export default {
name: "", name: "",
@ -396,7 +396,6 @@
this.deliveryTypeList(); this.deliveryTypeList();
this.queryPsnTypeByPage(); this.queryPsnTypeByPage();
this.orderTypeList(); this.orderTypeList();
// this.getOrgTreeData();//-
this.orderRefundTypeList(); this.orderRefundTypeList();
this.getList() this.getList()
}, },
@ -473,12 +472,6 @@
this.orderTypeOptions = response.data; this.orderTypeOptions = response.data;
}); });
}, },
//-
getOrgTreeData() {
custOrgTreeApi({}).then((response) => {
this.treeOrgOptions = response;
});
},
//退 //退
orderRefundTypeList(){ orderRefundTypeList(){

View File

@ -404,7 +404,7 @@
<script> <script>
import { deptTreeSelect } from '@/api/system/user' import { deptTreeSelect } from '@/api/system/user'
import { systemAreaTreeApi,getSupermarketByAreaApi,getCanteenByAreaApi,getStallByCanteenApi,orderStateListApi,orderPayAllTypeApi,queryPsnTypeByPageApi,deliveryTypeListApi,custOrgTreeApi,orderTypeListApi} from "@/api/superStore/superOrder"; import { systemAreaTreeApi,getSupermarketByAreaApi,getCanteenByAreaApi,getStallByCanteenApi,orderStateListApi,orderPayAllTypeApi,queryPsnTypeByPageApi,deliveryTypeListApi,orderTypeListApi} from "@/api/superStore/superOrder";
import { orderPageListApi,orderDetailInfoApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi,syncOrderPayStateApi } from "@/api/superStore/superOrder"; import { orderPageListApi,orderDetailInfoApi,refundOrderPartApi,refundOrderApi,writeOffOrderApi,syncOrderPayStateApi } from "@/api/superStore/superOrder";
export default { export default {
name: "", name: "",
@ -598,12 +598,6 @@
this.orderTypeOptions = response.data; ; this.orderTypeOptions = response.data; ;
}); });
}, },
//-
getOrgTreeData() {
custOrgTreeApi({}).then((response) => {
this.treeOrgOptions = response;
});
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {