|
@@ -1,4 +1,4 @@
|
|
|
-import { apiFlowDetail, apiSealAdd, apiSearchCustome, apiSearchContract } from "@/api/approve/seal.js";
|
|
|
+import { apiFlowDetail, apiSealAdd, apiSearchCustome, apiSearchContract,apiSearchAllCustome } from "@/api/approve/seal.js";
|
|
|
import { uploadFiles } from "@/utils/uploadFile.js";
|
|
|
import { preViewFile } from "../utils/util.js";
|
|
|
export const sealMixin = {
|
|
@@ -63,6 +63,14 @@ export const sealMixin = {
|
|
|
searchCustomeStatus: true, //搜索客户 是否有结果
|
|
|
searchCustomeList: [], //搜索到的客户名称列表
|
|
|
searchContractList: [], //选择搜索中的客户后合同列表数据
|
|
|
+
|
|
|
+ allCustome:{
|
|
|
+ index:1,
|
|
|
+ list:[],
|
|
|
+ finished:false,
|
|
|
+ loading:false
|
|
|
+ },
|
|
|
+ temCustomeName:''
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -194,5 +202,59 @@ export const sealMixin = {
|
|
|
this.processData = res.data || null;
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ handleAllCutomeInput(e){
|
|
|
+ this.temCustomeName=e.detail.value
|
|
|
+ this.allCustome.index=1
|
|
|
+ this.allCustome.list=[]
|
|
|
+ this.allCustome.finished=false
|
|
|
+ this.allCustome.loading=false
|
|
|
+ if(this.temCustomeName){
|
|
|
+ this.getSearchAllCustome()
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 搜素全部客户
|
|
|
+ async getSearchAllCustome(){
|
|
|
+ this.allCustome.loading=true
|
|
|
+ const res=await apiSearchAllCustome({
|
|
|
+ PageSize:20,
|
|
|
+ CurrentIndex:this.allCustome.index,
|
|
|
+ Keyword:this.temCustomeName,
|
|
|
+ })
|
|
|
+ this.allCustome.loading=false
|
|
|
+ if(res.code===200){
|
|
|
+ if(res.data){
|
|
|
+ this.allCustome.list=[...this.allCustome.list,...res.data]
|
|
|
+ }else{
|
|
|
+ this.allCustome.finished=true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 搜素全部客户弹窗触底
|
|
|
+ handleScrollToLower(){
|
|
|
+ if(this.allCustome.loading||this.allCustome.finished) return
|
|
|
+ this.allCustome.index++
|
|
|
+ this.getSearchAllCustome()
|
|
|
+ },
|
|
|
+
|
|
|
+ chooseAllCustomeItem(e){
|
|
|
+ this.customeName=e.CompanyName
|
|
|
+ this.allCustome.index=1
|
|
|
+ this.allCustome.list=[]
|
|
|
+ this.allCustome.finished=false
|
|
|
+ this.allCustome.loading=false
|
|
|
+
|
|
|
+ },
|
|
|
+ // 收起搜索弹窗
|
|
|
+ handleClickPage(){
|
|
|
+ if(this.allCustome.list.length>0){
|
|
|
+ this.allCustome.index=1
|
|
|
+ this.allCustome.list=[]
|
|
|
+ this.allCustome.finished=false
|
|
|
+ this.allCustome.loading=false
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|