myluckyexcel.js 7.63 KB
Newer Older
chengwenlong's avatar
chengwenlong committed
1
import request from "@/utils/request";
lenovo's avatar
lenovo committed
2
import LuckyExcel from "luckyexcel";
hehongwei's avatar
hehongwei committed
3 4
//查询6矿物聊
export function materialListPZ() {
chengwenlong's avatar
chengwenlong committed
5 6 7 8
    return request({
        url: "/ActSuppliesDetails/ActSuppliesDetails/materialListPZ",
        method: "get",
    });
hehongwei's avatar
hehongwei committed
9
}
xiangjiaojunxp's avatar
xiangjiaojunxp committed
10 11 12

//小物料转大物料
export function materialConvert(data) {
chengwenlong's avatar
chengwenlong committed
13 14 15 16 17
    return request({
        url: "/ActSuppliesConvert/ActSuppliesConvert/converSupplies",
        method: "post",
        data: data,
    });
xiangjiaojunxp's avatar
xiangjiaojunxp committed
18
}
lenovo's avatar
lenovo committed
19 20
// 查询Excel模板列表
export function listSuppliesTemplate(query) {
chengwenlong's avatar
chengwenlong committed
21 22 23 24 25
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate/list",
        method: "get",
        params: query,
    });
lenovo's avatar
lenovo committed
26 27
}

28 29 30
// 查询导入规则列表
export function listSuppliesrole(id) {
    return request({
chengwenlong's avatar
chengwenlong committed
31 32 33
        url: "/SuppliesTemplate/SuppliesTemplate/lists/" + id,
        method: "get",
    });
34 35 36 37 38
}

// 查询导入规则详细
export function getSuppliesrole(id) {
    return request({
chengwenlong's avatar
chengwenlong committed
39 40 41
        url: "/system/suppliesrole/" + id,
        method: "get",
    });
42
}
hehongwei's avatar
hehongwei committed
43
//按照矿的id去查部门分类
chengwenlong's avatar
chengwenlong committed
44 45 46 47 48 49 50 51
export function department(sskId) {
    return request({
        url: `/ActClassification/ActClassification/SunDy/${sskId}`,
        method: "get",
    });
}
//获取到会计科目编码
export function accountingcode(newData) {
hehongwei's avatar
hehongwei committed
52
    return request({
chengwenlong's avatar
chengwenlong committed
53 54 55 56
        url: `/ActSuppliesAccount/ActSuppliesAccount/newOptions`,
        method: "post",
        data: newData,
    });
hehongwei's avatar
hehongwei committed
57 58
}
//获取到会计科目编码
chengwenlong's avatar
chengwenlong committed
59
export function getyy(newData) {
hehongwei's avatar
hehongwei committed
60
    return request({
chengwenlong's avatar
chengwenlong committed
61 62 63 64
        url: `/wages/getyy`,
        method: "post",
        data: newData,
    });
hehongwei's avatar
hehongwei committed
65
}
lenovo's avatar
lenovo committed
66
//展示excel模板
67
export function listSuppliesTemplateId(id) {
chengwenlong's avatar
chengwenlong committed
68 69 70 71
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate/listId/" + id,
        method: "get",
    });
lenovo's avatar
lenovo committed
72 73 74 75
}

// 查询Excel模板详细
export function getSuppliesTemplate(id) {
chengwenlong's avatar
chengwenlong committed
76 77 78 79
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate/" + id,
        method: "get",
    });
lenovo's avatar
lenovo committed
80 81
}

82 83 84
// 修改导入规则
export function updateSuppliesrole(id) {
    return request({
chengwenlong's avatar
chengwenlong committed
85 86 87
        url: "/system/suppliesrole/edit" + id,
        method: "put",
    });
88 89
}

lenovo's avatar
lenovo committed
90 91
// 新增Excel模板
export function addSuppliesTemplate(data) {
chengwenlong's avatar
chengwenlong committed
92 93 94 95 96 97 98 99
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate",
        headers: {
            repeatSubmit: false,
        },
        method: "post",
        data: data,
    });
lenovo's avatar
lenovo committed
100 101 102 103
}

// 修改Excel模板
export function updateSuppliesTemplate(data) {
chengwenlong's avatar
chengwenlong committed
104 105 106 107 108
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate",
        method: "put",
        data: data,
    });
lenovo's avatar
lenovo committed
109 110
}

chengwenlong's avatar
chengwenlong committed
111
export function releaseTemplateStatus(id) {
lenovo's avatar
lenovo committed
112
    return request({
chengwenlong's avatar
chengwenlong committed
113 114 115
        url: "/SuppliesTemplate/SuppliesTemplate/releaseStatus/" + id,
        method: "get",
    });
lenovo's avatar
lenovo committed
116 117
}

chengwenlong's avatar
chengwenlong committed
118
export function offShelfTemplateStatus(id) {
lenovo's avatar
lenovo committed
119
    return request({
chengwenlong's avatar
chengwenlong committed
120 121 122
        url: "/SuppliesTemplate/SuppliesTemplate/offShelfStatus/" + id,
        method: "get",
    });
lenovo's avatar
lenovo committed
123 124
}

chengwenlong's avatar
chengwenlong committed
125
export function CopyTemplate(id) {
lenovo's avatar
lenovo committed
126
    return request({
chengwenlong's avatar
chengwenlong committed
127 128 129
        url: "/SuppliesTemplate/SuppliesTemplate/copyTemplate/" + id,
        method: "get",
    });
lenovo's avatar
lenovo committed
130 131
}

lenovo's avatar
lenovo committed
132 133
// 删除Excel模板
export function delSuppliesTemplate(id) {
chengwenlong's avatar
chengwenlong committed
134 135 136 137
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate/" + id,
        method: "delete",
    });
lenovo's avatar
lenovo committed
138 139 140 141
}

// 展示Excel模板
export function delSuppliesSave(id) {
chengwenlong's avatar
chengwenlong committed
142 143 144 145
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate/save/" + id,
        method: "get",
    });
lenovo's avatar
lenovo committed
146 147
}

148 149
//启用
export function toggleEnable(id) {
chengwenlong's avatar
chengwenlong committed
150 151 152 153
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate/enable/" + id,
        method: "get",
    });
154 155 156
}
//禁用
export function toggleDisable(id) {
chengwenlong's avatar
chengwenlong committed
157 158 159 160
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate/disable/" + id,
        method: "get",
    });
161 162
}

163
export function findName(name) {
chengwenlong's avatar
chengwenlong committed
164 165 166 167
    return request({
        url: "/SuppliesTemplate/SuppliesTemplate/ifName/" + name,
        method: "get",
    });
168 169
}

170 171
// 模板转换页面查询规则对应用友物料名称
export function getSuppliesName(name) {
chengwenlong's avatar
chengwenlong committed
172 173 174 175
    return request({
        url: "/ActSuppliesConvert/ActSuppliesConvert/saveSuppliesname/" + name,
        method: "get",
    });
176
}
177

178 179
// 模板转换页面查询Excel模板列表
export function templateList(query) {
chengwenlong's avatar
chengwenlong committed
180 181 182 183 184
    return request({
        url: "/ActSuppliesConvert/ActSuppliesConvert/list",
        method: "get",
        params: query,
    });
185 186 187
}
// 模板转换页面查询Excel模板内容列表
export function templateListid(id) {
chengwenlong's avatar
chengwenlong committed
188 189 190 191
    return request({
        url: "/ActSuppliesConvert/ActSuppliesConvert/listid/" + id,
        method: "get",
    });
192 193 194
}
// 模板转换页面查询规则列表
export function roleList(id) {
chengwenlong's avatar
chengwenlong committed
195 196 197 198
    return request({
        url: "/ActSuppliesConvert/ActSuppliesConvert/rolelist/" + id,
        method: "get",
    });
199 200 201
}
// 模板转换页面查询规则详情列表
export function roleListid(id) {
chengwenlong's avatar
chengwenlong committed
202 203 204 205
    return request({
        url: "/ActSuppliesConvert/ActSuppliesConvert/rolelistid/" + id,
        method: "get",
    });
206
}
lenovo's avatar
lenovo committed
207

xiangjiaojunxp's avatar
xiangjiaojunxp committed
208 209
// 查询规则列表
export function listRule(query) {
chengwenlong's avatar
chengwenlong committed
210 211 212 213 214
    return request({
        url: "/system/ruleManagement/list",
        method: "get",
        params: query,
    });
xiangjiaojunxp's avatar
xiangjiaojunxp committed
215 216 217
}
// 查询规则详情详细
export function getRule(id) {
chengwenlong's avatar
chengwenlong committed
218 219 220 221
    return request({
        url: "/system/ruleManagement/" + id,
        method: "get",
    });
xiangjiaojunxp's avatar
xiangjiaojunxp committed
222
}
lvzhuangzhuang's avatar
1  
lvzhuangzhuang committed
223 224
// 新增规则详情
export function addRuleManagement(data) {
chengwenlong's avatar
chengwenlong committed
225 226 227 228 229
    return request({
        url: "/system/ruleManagement/add",
        method: "post",
        data: data,
    });
lvzhuangzhuang's avatar
1  
lvzhuangzhuang committed
230 231 232 233
}

// 修改规则详情
export function updateRuleManagement(data) {
chengwenlong's avatar
chengwenlong committed
234 235 236 237 238
    return request({
        url: "/system/ruleManagement/edit",
        method: "put",
        data: data,
    });
lvzhuangzhuang's avatar
1  
lvzhuangzhuang committed
239 240 241
}
// 删除规则详情
export function delRuleManagement(id) {
chengwenlong's avatar
chengwenlong committed
242 243 244 245
    return request({
        url: "/system/ruleManagement/" + id,
        method: "delete",
    });
lvzhuangzhuang's avatar
1  
lvzhuangzhuang committed
246 247
}

张兴海's avatar
.  
张兴海 committed
248 249 250
//查询六矿物料
export function materialList() {
    return request({
chengwenlong's avatar
chengwenlong committed
251 252 253 254 255 256 257 258 259 260 261 262
        url: "/ActSuppliesDetails/ActSuppliesDetails/materialList",
        method: "get",
    });
}
//查询材料编码
export function code(mine) {
    const mineId = mine;
    return request({
        url: "/act/material/dateofid",
        method: "post",
        data: { mineId },
    });
张兴海's avatar
.  
张兴海 committed
263
}
lvzhuangzhuang's avatar
1  
lvzhuangzhuang committed
264

chengwenlong's avatar
chengwenlong committed
265 266 267 268 269 270 271 272 273 274
export function listMyluckyexcel(query) {
    return request({
        url: "/wages/excel",
        method: "post",
        headers: {
            "Content-Type": "multipart/form-data",
        },
        data: query,
    });
}
lvzhuangzhuang's avatar
1  
lvzhuangzhuang committed
275

lenovo's avatar
lenovo committed
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
// // 查询模板列表
// export function listMyluckyexcel(query) {
//   return request({
//     url: '/system/supplies/list',
//     method: 'get',
//     params: query
//   })
// }
//
// // 查询模板详情详细
// export function getMyluckyexcel(id) {
//   return request({
//     url: '/system/supplies/' + id,
//     method: 'get'
//   })
// }
//
// // 新增模板详情
// export function addMyluckyexcel(data) {
//   return request({
//     url: '/system/supplies/save',
//     method: 'post',
//     data: data
//   })
// }
//
// // 修改模板详情
// export function updateMyluckyexcel(data) {
//   return request({
//     url: '/system/supplies/edit',
//     method: 'put',
//     data: data
//   })
// }
// // 删除模板详情
// export function delMyluckyexcel(id) {
//   return request({
//     url: '/system/supplies/' + id,
//     method: 'delete'
//   })
//
//
// }
//
// // 导出模板详情
// export function exportMyluckyexcel(query) {
//   return request({
//     url: '/SuppliesTemplate/SuppliesTemplate/export',
//     method: 'get',
//     params: query
//   })
// }
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343

export function asiccData(data) {
    return request({
        url: 'asicc/getData',
        method: "post",
        data,
    });
}

export function asmInfoSave(data) {
    return request({
        url: 'asmInfo/save',
        method: "post",
        data,
    });
}