|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<el-dialog
|
|
|
v-loading="loading"
|
|
|
- title="销售单详情"
|
|
|
+ title="销售单列表"
|
|
|
:center="true"
|
|
|
align="left"
|
|
|
top="2vh"
|
|
@@ -11,7 +11,7 @@
|
|
|
element-loading-text="拼命加载中"
|
|
|
element-loading-spinner="el-icon-loading"
|
|
|
element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
- @close="showModelThis = false"
|
|
|
+ @close="curDropItem = {value:'1',label:'模糊搜索'};showModelThis = false"
|
|
|
>
|
|
|
<el-card style="margin-top: -20px">
|
|
|
<ex-table
|
|
@@ -95,15 +95,37 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="padding: 10px 0 0 0">
|
|
|
- <el-col :span="6" style="width: 371px">
|
|
|
+ <el-col :span="6" style="width: 371px;display:flex">
|
|
|
+ <el-dropdown style="height:20px">
|
|
|
+ <el-button size="mini" style="margin-right:10px">
|
|
|
+ {{ curDropItem.label }}<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item v-for="item in dropdownItem" :key="item.value">
|
|
|
+ <p @click="handleTypeChange(item)">{{item.label}}</p>
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
+
|
|
|
<search-customer
|
|
|
- :value="customerCode"
|
|
|
+ v-if="curDropItem.value === '0'"
|
|
|
+ :value="parmValue.customerCode"
|
|
|
:size="searchSize"
|
|
|
:names="parmValue.supplierName"
|
|
|
:is-detail="true"
|
|
|
:placeholder="'企业客户'"
|
|
|
@searchChange="customerChange"
|
|
|
/>
|
|
|
+
|
|
|
+ <el-input v-else v-model="parmValue.customer_name" size="mini" placeholder="企业客户" @change="
|
|
|
+ pageInfo.curr = 1;
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();
|
|
|
+ " />
|
|
|
+
|
|
|
+
|
|
|
</el-col>
|
|
|
<el-col :span="4" style="width: 150px; padding: 0 0 0 9px">
|
|
|
<el-select
|
|
@@ -308,6 +330,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ curDropItem: {value:'1',label:'模糊搜索'},
|
|
|
usetypeOtions,
|
|
|
showModelThis: this.showModel,
|
|
|
select: '1',
|
|
@@ -320,6 +343,10 @@ export default {
|
|
|
sselect: '创建时间',
|
|
|
xs_order_source_options,
|
|
|
xs_order_type_options,
|
|
|
+ dropdownItem:[
|
|
|
+ {value:'1',label:'模糊搜索'},
|
|
|
+ {value:'0',label:'精准搜索'}
|
|
|
+ ],
|
|
|
// 状态
|
|
|
statusOptions: [
|
|
|
{ id: '0', label: '待发货' },
|
|
@@ -337,10 +364,11 @@ export default {
|
|
|
],
|
|
|
cg_order_type_options,
|
|
|
selected: [],
|
|
|
-
|
|
|
loading: false,
|
|
|
showModel: false,
|
|
|
parmValue: {
|
|
|
+ customerCode:[],
|
|
|
+ customer_name:'',
|
|
|
use_type: '',
|
|
|
order_source: '',
|
|
|
order_type: '', // 订单来源
|
|
@@ -377,7 +405,6 @@ export default {
|
|
|
columns: columns
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
methods: {
|
|
|
// 提交
|
|
|
async submit() {
|
|
@@ -396,6 +423,8 @@ export default {
|
|
|
this.input = ''
|
|
|
this.customerCode = []
|
|
|
this.parmValue = {
|
|
|
+ customerCode:[],
|
|
|
+ customer_name:'',
|
|
|
order_type: '',
|
|
|
orderCode: '', // 销售订单code
|
|
|
apply_name: '', // 申请人
|
|
@@ -419,6 +448,12 @@ export default {
|
|
|
}
|
|
|
this.searchList()
|
|
|
},
|
|
|
+ handleTypeChange(item){
|
|
|
+ this.curDropItem = item;
|
|
|
+ this.parmValue.customerCode = [];
|
|
|
+ this.parmValue.customer_name = "";
|
|
|
+ this.searchList();
|
|
|
+ },
|
|
|
async handleClick(e) {
|
|
|
this.sselect = e
|
|
|
this.parmValue.start = e === '创建时间' ? this.timeOBJ.start : ''
|
|
@@ -437,6 +472,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ async customerChange(e) {
|
|
|
+ const { code, label } = e;
|
|
|
+ this.parmValue.customerCode = code ? [code] : [];
|
|
|
+ this.parmValue.supplierName = label || "";
|
|
|
+ this.searchList();
|
|
|
+ },
|
|
|
+
|
|
|
async searchList() {
|
|
|
if (
|
|
|
(this.parmValue.start !== '' && this.parmValue.end === '') ||
|
|
@@ -453,8 +495,19 @@ export default {
|
|
|
this.parmValue.company_name =
|
|
|
this.select === 'company_name' ? this.input : ''
|
|
|
|
|
|
+ const model = JSON.parse(JSON.stringify(this.parmValue))
|
|
|
+
|
|
|
+ model.customer_code = Array.isArray(model.customerCode) ? model.customerCode[0] : ""
|
|
|
+ delete model.customerCode
|
|
|
+
|
|
|
+ if(this.curDropItem.value === '0'){
|
|
|
+ delete model['customer_name']
|
|
|
+ }else{
|
|
|
+ delete model['customer_code']
|
|
|
+ }
|
|
|
+
|
|
|
const res = await asyncRequest.saleList({
|
|
|
- ...this.parmValue,
|
|
|
+ ...model,
|
|
|
needRela: true
|
|
|
})
|
|
|
|