|
@@ -2,7 +2,7 @@
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
<el-form-item label="公司名" prop="companyId">
|
|
|
- <el-select v-model="queryParams.companyId" placeholder="请选择公司名" clearable size="small">
|
|
|
+ <el-select v-model="queryParams.companyId" placeholder="请选择公司名" @change="companyChange" clearable size="small">
|
|
|
<el-option
|
|
|
v-for="item in companys"
|
|
|
:key="item.companyId"
|
|
@@ -11,9 +11,13 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item >
|
|
|
+ <treeselect style="width: 220px" :clearable="false" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item label="订单号" prop="orderCode">
|
|
|
<el-input
|
|
|
-
|
|
|
v-model="queryParams.orderCode"
|
|
|
placeholder="请输入订单号"
|
|
|
clearable
|
|
@@ -21,9 +25,9 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="运单号" prop="deliveryId">
|
|
|
<el-input
|
|
|
-
|
|
|
v-model="queryParams.deliveryId"
|
|
|
placeholder="请输入运单号"
|
|
|
clearable
|
|
@@ -31,9 +35,9 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<el-form-item label="手机号" prop="userPhone">
|
|
|
<el-input
|
|
|
-
|
|
|
v-model="queryParams.userPhone"
|
|
|
placeholder="请输入手机号"
|
|
|
clearable
|
|
@@ -432,9 +436,18 @@ import addUserAddress from "../components/addUserAddress";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import QRCode from 'qrcodejs2'
|
|
|
import { getCompanyList } from "@/api/company/company";
|
|
|
+
|
|
|
+import { treeselect } from "@/api/company/companyDept";
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+
|
|
|
export default {
|
|
|
- components: { productOrder,productSelect,addUser,addUserAddress },
|
|
|
+ components: { productOrder,productSelect,addUser,addUserAddress,Treeselect },
|
|
|
name: "StoreOrder",
|
|
|
+ watch: {
|
|
|
+ // 监听deptId
|
|
|
+ 'deptId': 'currDeptChange'
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
importMsgOpen:false,
|
|
@@ -442,6 +455,9 @@ export default {
|
|
|
deliveryPayStatusOptions:[],
|
|
|
deliveryStatusOptions:[],
|
|
|
companys:[],
|
|
|
+ deptOptions:[],
|
|
|
+ companyId:undefined,
|
|
|
+ deptId:undefined,
|
|
|
orderTypeOptions:[],
|
|
|
payTypeOptions:[],
|
|
|
payQr:{
|
|
@@ -546,6 +562,7 @@ export default {
|
|
|
isChannel: null,
|
|
|
isRemind: null,
|
|
|
isSysDel: null,
|
|
|
+ deptId:null,
|
|
|
|
|
|
},
|
|
|
// 表单参数
|
|
@@ -582,6 +599,10 @@ export default {
|
|
|
created() {
|
|
|
getCompanyList().then(response => {
|
|
|
this.companys = response.data;
|
|
|
+ if(this.companys!=null&&this.companys.length>0){
|
|
|
+ this.companyId=this.companys[0].companyId;
|
|
|
+ this.getTreeselect();
|
|
|
+ }
|
|
|
});
|
|
|
this.getDicts("store_order_type").then((response) => {
|
|
|
this.orderTypeOptions = response.data;
|
|
@@ -904,6 +925,29 @@ export default {
|
|
|
// dangerouslyUseHTMLString: true
|
|
|
// });
|
|
|
this.getList();
|
|
|
+ },
|
|
|
+
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
+ getTreeselect() {
|
|
|
+ var that=this;
|
|
|
+ var param={companyId:this.companyId}
|
|
|
+ treeselect(param).then((response) => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ console.log(this.deptOptions)
|
|
|
+ if(response.data!=null&&response.data.length>0){
|
|
|
+ //this.queryParams.deptId=response.data[0].id;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ companyChange(val){
|
|
|
+ console.log(val);
|
|
|
+ this.companyId=val;
|
|
|
+ this.getTreeselect();
|
|
|
+ },
|
|
|
+ currDeptChange(val){
|
|
|
+ console.log(val)
|
|
|
+ this.queryParams.deptId=val;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
}
|
|
|
};
|