You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
435 lines
6.8 KiB
435 lines
6.8 KiB
import request from "@/utils/request.js"; |
|
|
|
/** |
|
* 登录 |
|
* @param {Object} data |
|
*/ |
|
export function postLogin(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/login`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 师傅端首页 |
|
* @param {Object} data |
|
*/ |
|
export function getMasterTaskList(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/master/task-list`, |
|
method: "get", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 任务详情 |
|
* @param {Object} data |
|
*/ |
|
export function getInstallDetails(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install/detail`, |
|
method: "get", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 获取任务类型 |
|
* @param {Object} data |
|
*/ |
|
export function getCommonGoodsType(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/common/goods-type`, |
|
method: "get", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 上传文件 |
|
* @param {Object} data |
|
*/ |
|
export function postUpload(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/common/upload`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 安装任务开工 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallStart(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install/start`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 安装新增售后 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallAfterSales(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install/after-sales`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 安装编辑售后 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallAfterUpdate(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-sales/update`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 更新密码 |
|
* @param {Object} data |
|
*/ |
|
export function postUpdatePwd(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/personal-center/update-password`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 个人中心安装任务 |
|
* @param {Object} data |
|
*/ |
|
export function getCneterInstallTaskList(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/personal-center/install-task-list`, |
|
method: "get", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 个人中心获取下属 |
|
* @param {Object} data |
|
*/ |
|
export function getCneterSubordinates(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/personal-center/get-subordinates`, |
|
method: "get", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 售后验收 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallSalesAcceptance(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-sales/acceptance`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 安装验收 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallAcceptance(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install/acceptance`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 完工详情 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallWorkingInfo(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install/work-info`, |
|
method: "get", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 完工提交 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallComplete(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install/complete`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 安装任务签到 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallSignIn(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install/sign-in`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 售后任务签到 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallSalesSignIn(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-sales/signIn`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 售后单详情 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallSalesDetail(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-sales/detail`, |
|
method: "get", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 售后单开工 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallSalesStart(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-sales/start`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 售后单完工 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallSalesComplete(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-sales/complete`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
|
|
/** |
|
* 安装单商品 -- 添加 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallCommodityAdd(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-commodity/add`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
|
|
/** |
|
* 安装单商品 -- 编辑 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallCommodityUpdate(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-commodity/update`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 获取下属售后任务 |
|
* @param {Object} data |
|
*/ |
|
export function getCenterInstallSalesTaskList(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/personal-center/install-sales-task-list`, |
|
method: "get", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 获取下属售后任务 |
|
* @param {Object} data |
|
*/ |
|
export function postCenterInstallSalesTheArrival(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-sales/the-arrival`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 获取下属售后任务 |
|
* @param {Object} data |
|
*/ |
|
export function getCommonGetItemData(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/common/get-item-data`, |
|
method: "get", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 售后指派 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallSalesDesignate(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install-sales/designate`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |
|
|
|
/** |
|
* 安装指派 |
|
* @param {Object} data |
|
*/ |
|
export function postInstallDesignate(data, loadingObj = {}, canCancel = false) { |
|
|
|
return request({ |
|
url: `api/install/designate`, |
|
method: "post", |
|
data |
|
}, |
|
loadingObj, |
|
canCancel |
|
); |
|
} |