| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388 |
- import request from '@/utils/requestAdmin'
- import {uploadImageToServer} from "../utils/requestAdmin";
- //返送验证码
- export function getVerificationCode(tel,userType){
- return request({
- url: `/miniapp/sendYzm?tel=`+ tel+"&userType="+userType,
- method: 'post',
- })
- }
- //登录
- export function login(tel,code,userType,jsCode){
- return request({
- url: `/miniapp/login`,
- method: 'post',
- params: {
- phone:tel,
- userType:userType,
- code:code,
- jsCode
- }
- })
- }
- export function getAdminUserInfo(){
- return request({
- url: `/miniapp/getAdminUserInfo`,
- method: 'post',
- })
- }
- export function getQrcodeNum(code,type){
- return request({
- url: `/ywy/getQrcodeNum`,
- method: 'post',
- params: {
- qrCode:code,
- operationType:type
- }
- })
- }
- export function doCommitToJxs(id){
- return request({
- url: `/ywy/writeOffSubmit`,
- method: 'post',
- params: {
- orderId:id
- }
- })
- }
- export function parseLocation(latitute,longitute){
- return request({
- url: `/miniapp/getLocation`,
- method: 'post',
- data: {
- latitute: latitute,
- longitute: longitute
- }
- })
- }
- export function xundianRecord(pageIndex,pageSize,storeName){
- return request({
- url: `/ywy/queryXunJi`,
- method: 'post',
- params: {
- pageIndex:pageIndex,
- pageSize:pageSize,
- storeName:storeName
- }
- })
- }
- export function doCommitToChang(id){
- return request({
- url: `/jxs/writeOffSubmit`,
- method: 'post',
- params: {
- orderId:id
- }
- })
- }
- export function active(data){
- return request({
- url: `/ywy/active`,
- method: 'post',
- data: data
- })
- }
- export function writeOff(data){
- return request({
- url: `/ywy/writeOff`,
- method: 'post',
- data: data
- })
- }
- export function getRetailDetail(id){
- return request({
- url: `/store/show`,
- method: 'post',
- params: {
- id:id
- }
- })
- }
- export function removeRetail(id){
- return request({
- url: `/store/delete`,
- method: 'post',
- params: {
- id:id
- }
- })
- }
- export function getStoreList(pageIndex,pageSize,storeName){
- return request({
- url: `/store/queryPage`,
- method: 'post',
- params: {
- pageIndex:pageIndex,
- pageSize:pageSize,
- storeName:storeName
- }
- })
- }
- export function addStore(store_name,contact_name,contact_phone,address,store_photo){
- return request({
- url: `/store/save`,
- method: 'post',
- params: {
- store_name:store_name,
- contact_name:contact_name,
- contact_phone:contact_phone,
- address:address,
- store_photo:store_photo
- }
- })
- }
- export function updateStore(id,store_name,contact_name,contact_phone,address, store_photo){
- return request({
- url: `/store/update`,
- method: 'post',
- params: {
- id:id,
- store_name:store_name,
- contact_name:contact_name,
- contact_phone:contact_phone,
- address:address,
- store_photo:store_photo
- }
- })
- }
- /**
- * 查询上货记录
- * @param pageIndex
- * @param pageSize
- * @returns {*}
- */
- export function queryActiveRecord(pageIndex,pageSize,storeName,startTime,endTime){
- return request({
- url: `/ywy/queryActiveRecord`,
- method: 'post',
- params: {
- pageIndex:pageIndex,
- pageSize:pageSize,
- storeName,
- startTime,
- endTime
- }
- })
- }
- /**
- * 查询上货记录
- * @param pageIndex
- * @param pageSize
- * @returns {*}
- */
- export function queryAddRecord(data){
- return request({
- url: `/ywy/writeOffRecord`,
- method: 'post',
- data: data
- });
- }
- /**
- * 核销记录的明细
- * @param id
- * @returns {*}
- */
- export function queryAddRecordDetail(id){
- return request({
- url: `/ywy/queryWriteOffDetail`,
- method: 'post',
- params: {
- orderNo:id
- }
- })
- }
- /**
- * 经销商核销记录
- * @param id
- * @returns {*}
- */
- export function queryJxsAddRecord(data){
- return request({
- url: `/jxs/writeOffRecord`,
- method: 'post',
- data: data
- });
- }
- /**
- * 经销商核销记录
- * @param id
- * @returns {*}
- */
- export function queryJxsAddRecordDetail(id){
- return request({
- url: `/jxs/queryWriteOffDetail`,
- method: 'post',
- params: {
- orderNo:id
- }
- })
- }
- export function ywyList(keyword){
- return request({
- url: `/jxs/jxsRetailListQuery`,
- method: 'post',
- params: {
- keyword:keyword
- }
- })
- }
- export function areaList(keyword){
- return request({
- url: `/jxs/jxsAreaList`,
- method: 'post',
- })
- }
- export function addYwy(data){
- return request({
- url: `/jxs/jxsSaveRetail`,
- method: 'post',
- data: data
- })
- }
- export function updateYwy(data){
- return request({
- url: `/jxs/jxsUpdateYwy`,
- method: 'post',
- data: data
- })
- }
- export function delYwy(id){
- return request({
- url: `/jxs/deleteYwy`,
- method: 'post',
- params: {
- ywyId:id
- }
- })
- }
- export function getYwyByIdDetail(id){
- return request({
- url: `/jxs/getYwyByIdDetail`,
- method: 'post',
- params: {
- ywyId:id
- }
- })
- }
- export async function uploadImage(files){
- const arr = []
- for(let i=0;i<files.length;i++){
- let url = files[i].path;
- let res = await uploadImageToServer(url);
- arr.push(res);
- }
- return arr;
- }
- export function addPatrolRecord(data){
- return request({
- url: `/ywy/addXunStore`,
- method: 'post',
- data: data
- })
- }
- /**
- * 经销商销售总数查询
- * @param startDate
- * @param endDate
- * @returns {*}
- */
- export function getSalesTotal(startDate,endDate){
- return request({
- url: `/jxs/salesTotal`,
- method: 'post',
- params: {
- startDate:startDate,
- endDate:endDate
- }
- })
- }
- /**
- * 经销商销售趋势统计
- * @param startDate
- * @param endDate
- * @returns {*}
- */
- export function getSalesTrend(startDate,endDate){
- return request({
- url: `/jxs/salesTrend`,
- method: 'post',
- params: {
- startDate:startDate,
- endDate:endDate
- }
- })
- }
- //业务员
- export function getSalesmanSalesTotal(startDate,endDate,ywyId){
- return request({
- url: `/jxs/salesmanSalesTotal`,
- method: 'post',
- params: {
- startDate:startDate,
- endDate:endDate,
- ywyId:ywyId
- }
- })
- }
- export function getSalesmanSalesTrend(startDate,endDate,ywyId){
- return request({
- url: `/jxs/salesmanSalesTrend`,
- method: 'post',
- params: {
- startDate:startDate,
- endDate:endDate,
- ywyId:ywyId
- }
- })
- }
- export function getSalesmanVisitTrend(startDate,endDate,ywyId){
- return request({
- url: `/jxs/salesmanVisitTrend`,
- method: 'post',
- params: {
- startDate:startDate,
- endDate:endDate,
- ywyId:ywyId
- }
- })
- }
|