123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- import fly from '../api/request.js'
- // 用户登录
- export function userLogin(code) {
- return fly.request({
- url: '/auth/mobile/token/social?grant_type=mobil&mobile=MINI@'+code,
- method: 'post',
- headers:{
- 'Authorization': 'Basic dGVzdDp0ZXN0'
- }
- })
- }
-
- // 获取验证码
- export function getSmsCode(mobile) {
- return fly.request({
- url: '/admin/mobile/'+mobile,
- method: 'get',
- headers:{
- 'Authorization': 'Basic dGVzdDp0ZXN0'
- }
- })
- }
- // 输入验证码获取token
- export function getSmsToken(mobile, code) {
- return fly.request({
- url: `/auth/mobile/token/sms?mobile=SMS@${mobile}&code=${code}&grant_type=mobile`,
- method: 'post',
- headers:{
- 'Authorization': 'Basic dGVzdDp0ZXN0'
- }
- })
- }
- // 输入验证码获取token
- export function bindOpenId(code) {
- return fly.request({
- url: `/admin/social/bind?state=MINI&code=${code}`,
- method: 'post'
- })
- }
- // 获取用户信息,判断token是否过期
- export function getUserInfo() {
- return fly.request({
- url: '/admin/user/info',
- method: 'get'
- })
- }
- // 获取菜单
- export function getMenu() {
- return fly.request({
- url: '/inventory/menu',
- method: 'get'
- })
- }
- // 获取样品单列表
- export function getSampleList(form) {
- return fly.request({
- url: '/inventory/sample/page',
- method: 'get',
- params: form
- })
- }
- // 获取样品单详情
- export function getSampleDetail(sdpId) {
- return fly.request({
- url: `/inventory/sample/${sdpId}`,
- method: 'get'
- })
- }
- // 获取样品单qa日志
- export function getSampleQaLog(sdpId) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/${sdpId}`,
- method: 'get'
- })
- }
- // 修改样品单qa日志
- export function changeSampleQaLog(sdpId,mark) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/picture?sdpId=${sdpId}&mark=${mark}`,
- method: 'put'
- })
- }
- // 添加样品单qa日志
- export function addSampleQaLog(sdpId,mark) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/log?sdpId=${sdpId}&mark=${mark}`,
- method: 'post'
- })
- }
- // 添加样品单qa图片
- export function addSamplePic(form) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/picture?sdpId=${sdpId}`,
- method: 'post',
- data: form
- })
- }
- // 删除样品单qa图片
- export function delSamplePic(sdpId, url) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/picture?sdpId=${sdpId}&url=${url}`,
- method: 'delete'
- })
- }
- // 获取采购合同列表
- export function getContractList(form) {
- return fly.request({
- url: '/inventory/supplier/contract/page',
- method: 'get',
- params: form
- })
- }
- // 获取采购合同详情
- export function getContractDetail(sscId,pId) {
- return fly.request({
- url: `/inventory/supplier/contract/${sscId}/${pId}`,
- method: 'get'
- })
- }
- // 获取采购合同qa日志
- export function getContractQaLog(sscId, pId) {
- return fly.request({
- url: `/inventory/supplier/contract/qalog/upload/${sscId}/${pId}`,
- method: 'get'
- })
- }
- // 修改采购合同qa日志
- export function changeContractQaLog(sscId, pId, mark) {
- return fly.request({
- url: `/inventory/supplier/contract/qalog/upload/picture?sscId=${sscId}&pId=${pId}&mark=${mark}`,
- method: 'put'
- })
- }
- // 添加采购合同qa日志
- export function addContractQaLog(sscId,pId,mark) {
- return fly.request({
- url: `/inventory/supplier/contract/qalog/upload/log?sscId=${sscId}&pId=${pId}&mark=${mark}`,
- method: 'post'
- })
- }
- // 添加采购合同qa图片
- export function addContractPic(form) {
- return fly.request({
- url: `/inventory/supplier/contract/qalog/upload/picture?sscId=${sscId}&pId=${pId}`,
- method: 'post',
- data: form
- })
- }
- // 删除采购合同qa图片
- export function delContractPic(sscId, pId, url) {
- return fly.request({
- url: `/inventory/supplier/contract/qalog/upload/picture?sscId=${sscId}&pId=${pId}&url=${url}`,
- method: 'delete'
- })
- }
- // 获取QC验货列表
- export function getQcList(form) {
- return fly.request({
- url: '/inventory/qc/contract/list',
- method: 'get',
- params: form
- })
- }
- // 获取QC验货详情
- export function getQcDetail(sscId, pId) {
- return fly.request({
- url: `/inventory/qc/${sscId}/${pId}`,
- method: 'get'
- })
- }
- // 获取QC验货qa日志
- export function getQcQaLog(sscId, pId) {
- return fly.request({
- url: `/inventory/qc/qclog/upload/${sscId}/${pId}`,
- method: 'get'
- })
- }
- // 修改QC验货qa日志
- export function changeQcQaLog(sscId, pId, mark) {
- return fly.request({
- url: `/inventory/qc/qclog/upload/picture?sscId=${sscId}&pId=${pId}&mark=${mark}`,
- method: 'put'
- })
- }
- // 添加QC验货qa日志
- export function addQcQaLog(sscId, pId, mark) {
- return fly.request({
- url: `/inventory/qc/qclog/upload/log?sscId=${sscId}&pId=${pId}&mark=${mark}`,
- method: 'post'
- })
- }
- // 添加qa图片
- export function addQcPic(form) {
- // return fly.request({
- // url: `/inventory/sample/qalog/upload/picture?sdpId=${sdpId}`,
- // method: 'post',
- // data: form
- // })
- }
- // 删除qa图片
- export function delQcPic(sscId, pId, url) {
- return fly.request({
- url: `/inventory/qc/qclog/upload/picture?sscId=${sscId}&pId=${pId}&url=${url}`,
- method: 'delete'
- })
- }
- // 生成QC验货初检报告
- export function generateQcReport(form) {
- return fly.request({
- url: '/inventory/qc/qcRepost',
- method: 'post',
- body: form
- })
- }
|