ljlong_2630
5 months ago
54 changed files with 6357 additions and 3908 deletions
File diff suppressed because it is too large
@ -0,0 +1,17 @@ |
|||||
|
<script> |
||||
|
export default { |
||||
|
onLaunch: function() { |
||||
|
console.log('App Launch') |
||||
|
}, |
||||
|
onShow: function() { |
||||
|
console.log('App Show') |
||||
|
}, |
||||
|
onHide: function() { |
||||
|
console.log('App Hide') |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
/*每个页面公共css */ |
||||
|
</style> |
@ -0,0 +1,20 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="en"> |
||||
|
<head> |
||||
|
<meta charset="UTF-8" /> |
||||
|
<script> |
||||
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || |
||||
|
CSS.supports('top: constant(a)')) |
||||
|
document.write( |
||||
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + |
||||
|
(coverSupport ? ', viewport-fit=cover' : '') + '" />') |
||||
|
</script> |
||||
|
<title></title> |
||||
|
<!--preload-links--> |
||||
|
<!--app-context--> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div id="app"><!--app-html--></div> |
||||
|
<script type="module" src="/main.js"></script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,22 @@ |
|||||
|
import App from './App' |
||||
|
|
||||
|
// #ifndef VUE3
|
||||
|
import Vue from 'vue' |
||||
|
import './uni.promisify.adaptor' |
||||
|
Vue.config.productionTip = false |
||||
|
App.mpType = 'app' |
||||
|
const app = new Vue({ |
||||
|
...App |
||||
|
}) |
||||
|
app.$mount() |
||||
|
// #endif
|
||||
|
|
||||
|
// #ifdef VUE3
|
||||
|
import { createSSRApp } from 'vue' |
||||
|
export function createApp() { |
||||
|
const app = createSSRApp(App) |
||||
|
return { |
||||
|
app |
||||
|
} |
||||
|
} |
||||
|
// #endif
|
@ -0,0 +1,72 @@ |
|||||
|
{ |
||||
|
"name" : "sfms3.0-uniapp3", |
||||
|
"appid" : "", |
||||
|
"description" : "", |
||||
|
"versionName" : "1.0.0", |
||||
|
"versionCode" : "100", |
||||
|
"transformPx" : false, |
||||
|
/* 5+App特有相关 */ |
||||
|
"app-plus" : { |
||||
|
"usingComponents" : true, |
||||
|
"nvueStyleCompiler" : "uni-app", |
||||
|
"compilerVersion" : 3, |
||||
|
"splashscreen" : { |
||||
|
"alwaysShowBeforeRender" : true, |
||||
|
"waiting" : true, |
||||
|
"autoclose" : true, |
||||
|
"delay" : 0 |
||||
|
}, |
||||
|
/* 模块配置 */ |
||||
|
"modules" : {}, |
||||
|
/* 应用发布信息 */ |
||||
|
"distribute" : { |
||||
|
/* android打包配置 */ |
||||
|
"android" : { |
||||
|
"permissions" : [ |
||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
||||
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
||||
|
"<uses-feature android:name=\"android.hardware.camera\"/>", |
||||
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
||||
|
] |
||||
|
}, |
||||
|
/* ios打包配置 */ |
||||
|
"ios" : {}, |
||||
|
/* SDK配置 */ |
||||
|
"sdkConfigs" : {} |
||||
|
} |
||||
|
}, |
||||
|
/* 快应用特有相关 */ |
||||
|
"quickapp" : {}, |
||||
|
/* 小程序特有相关 */ |
||||
|
"mp-weixin" : { |
||||
|
"appid" : "", |
||||
|
"setting" : { |
||||
|
"urlCheck" : false |
||||
|
}, |
||||
|
"usingComponents" : true |
||||
|
}, |
||||
|
"mp-alipay" : { |
||||
|
"usingComponents" : true |
||||
|
}, |
||||
|
"mp-baidu" : { |
||||
|
"usingComponents" : true |
||||
|
}, |
||||
|
"mp-toutiao" : { |
||||
|
"usingComponents" : true |
||||
|
}, |
||||
|
"uniStatistics" : { |
||||
|
"enable" : false |
||||
|
}, |
||||
|
"vueVersion" : "3" |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
{ |
||||
|
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
||||
|
{ |
||||
|
"path": "pages/index/index", |
||||
|
"style": { |
||||
|
"navigationBarTitleText": "uni-app" |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"globalStyle": { |
||||
|
"navigationBarTextStyle": "black", |
||||
|
"navigationBarTitleText": "uni-app", |
||||
|
"navigationBarBackgroundColor": "#F8F8F8", |
||||
|
"backgroundColor": "#F8F8F8" |
||||
|
}, |
||||
|
"uniIdRouter": {} |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
<template> |
||||
|
<view class="content"> |
||||
|
<image class="logo" src="/static/logo.png"></image> |
||||
|
<view class="text-area"> |
||||
|
<text class="title">{{title}}</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
title: 'Hello' |
||||
|
} |
||||
|
}, |
||||
|
onLoad() { |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
.content { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.logo { |
||||
|
height: 200rpx; |
||||
|
width: 200rpx; |
||||
|
margin-top: 200rpx; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
margin-bottom: 50rpx; |
||||
|
} |
||||
|
|
||||
|
.text-area { |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.title { |
||||
|
font-size: 36rpx; |
||||
|
color: #8f8f94; |
||||
|
} |
||||
|
</style> |
After Width: | Height: | Size: 3.9 KiB |
@ -0,0 +1,10 @@ |
|||||
|
uni.addInterceptor({ |
||||
|
returnValue (res) { |
||||
|
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { |
||||
|
return res; |
||||
|
} |
||||
|
return new Promise((resolve, reject) => { |
||||
|
res.then((res) => res[0] ? reject(res[0]) : resolve(res[1])); |
||||
|
}); |
||||
|
}, |
||||
|
}); |
@ -0,0 +1,76 @@ |
|||||
|
/** |
||||
|
* 这里是uni-app内置的常用样式变量 |
||||
|
* |
||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 |
||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App |
||||
|
* |
||||
|
*/ |
||||
|
|
||||
|
/** |
||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 |
||||
|
* |
||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 |
||||
|
*/ |
||||
|
|
||||
|
/* 颜色变量 */ |
||||
|
|
||||
|
/* 行为相关颜色 */ |
||||
|
$uni-color-primary: #007aff; |
||||
|
$uni-color-success: #4cd964; |
||||
|
$uni-color-warning: #f0ad4e; |
||||
|
$uni-color-error: #dd524d; |
||||
|
|
||||
|
/* 文字基本颜色 */ |
||||
|
$uni-text-color:#333;//基本色 |
||||
|
$uni-text-color-inverse:#fff;//反色 |
||||
|
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 |
||||
|
$uni-text-color-placeholder: #808080; |
||||
|
$uni-text-color-disable:#c0c0c0; |
||||
|
|
||||
|
/* 背景颜色 */ |
||||
|
$uni-bg-color:#ffffff; |
||||
|
$uni-bg-color-grey:#f8f8f8; |
||||
|
$uni-bg-color-hover:#f1f1f1;//点击状态颜色 |
||||
|
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 |
||||
|
|
||||
|
/* 边框颜色 */ |
||||
|
$uni-border-color:#c8c7cc; |
||||
|
|
||||
|
/* 尺寸变量 */ |
||||
|
|
||||
|
/* 文字尺寸 */ |
||||
|
$uni-font-size-sm:12px; |
||||
|
$uni-font-size-base:14px; |
||||
|
$uni-font-size-lg:16px; |
||||
|
|
||||
|
/* 图片尺寸 */ |
||||
|
$uni-img-size-sm:20px; |
||||
|
$uni-img-size-base:26px; |
||||
|
$uni-img-size-lg:40px; |
||||
|
|
||||
|
/* Border Radius */ |
||||
|
$uni-border-radius-sm: 2px; |
||||
|
$uni-border-radius-base: 3px; |
||||
|
$uni-border-radius-lg: 6px; |
||||
|
$uni-border-radius-circle: 50%; |
||||
|
|
||||
|
/* 水平间距 */ |
||||
|
$uni-spacing-row-sm: 5px; |
||||
|
$uni-spacing-row-base: 10px; |
||||
|
$uni-spacing-row-lg: 15px; |
||||
|
|
||||
|
/* 垂直间距 */ |
||||
|
$uni-spacing-col-sm: 4px; |
||||
|
$uni-spacing-col-base: 8px; |
||||
|
$uni-spacing-col-lg: 12px; |
||||
|
|
||||
|
/* 透明度 */ |
||||
|
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 |
||||
|
|
||||
|
/* 文章场景相关 */ |
||||
|
$uni-color-title: #2C405A; // 文章标题颜色 |
||||
|
$uni-font-size-title:20px; |
||||
|
$uni-color-subtitle: #555555; // 二级标题颜色 |
||||
|
$uni-font-size-subtitle:26px; |
||||
|
$uni-color-paragraph: #3F536E; // 文章段落颜色 |
||||
|
$uni-font-size-paragraph:15px; |
@ -0,0 +1,6 @@ |
|||||
|
import http from '../http' |
||||
|
|
||||
|
// 文件列表
|
||||
|
export function listNoPage(params) { |
||||
|
return http.post('/eam/attachment-file/listNoPage',{params}) |
||||
|
} |
@ -0,0 +1,119 @@ |
|||||
|
import http from '../http' |
||||
|
|
||||
|
|
||||
|
// 添加工单
|
||||
|
export function repairOrderCreate(data,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.post('/eam/equipment-repair-job-main/create', data) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.post('/eam/equipment-repair-job-main/create', data) |
||||
|
} |
||||
|
} |
||||
|
// 编辑工单
|
||||
|
export function repairOrderUpdate(data,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.put('/eam/equipment-repair-job-main/update', data) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.put('/eam/equipment-repair-job-main/update', data) |
||||
|
} |
||||
|
} |
||||
|
// 工单列表
|
||||
|
export function repairOrderPage(params,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.get('/eam/equipment-repair-job-main/page', {params}) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.get('/eam/equipment-repair-job-main/page', {params}) |
||||
|
} |
||||
|
} |
||||
|
// 获取维修工单详情信息
|
||||
|
export function getDeviceRepairDetail(params,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.get('eam/equipment-repair-job-main/page', {params}) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.get('eam/equipment-repair-job-main/page', {params}) |
||||
|
} |
||||
|
} |
||||
|
// 接单
|
||||
|
export function orderClick(params,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.get('/eam/equipment-repair-job-main/orderClick', {params}) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.get('/eam/equipment-repair-job-main/orderClick', {params}) |
||||
|
} |
||||
|
} |
||||
|
// 完成
|
||||
|
export function orderClickFinish(params,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.get('/eam/equipment-repair-job-main/orderClickFinish', {params}) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.get('/eam/equipment-repair-job-main/orderClickFinish', {params}) |
||||
|
} |
||||
|
} |
||||
|
// 确认
|
||||
|
export function orderClickConfirm(params,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.get('/eam/equipment-repair-job-main/orderClickConfirm', {params}) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.get('/eam/equipment-repair-job-main/orderClickConfirm', {params}) |
||||
|
} |
||||
|
} |
||||
|
// 验证
|
||||
|
export function orderClickVerify(params,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.get('/eam/equipment-repair-job-main/orderClickVerify', {params}) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.get('/eam/equipment-repair-job-main/orderClickVerify', {params}) |
||||
|
} |
||||
|
} |
||||
|
// 添加维修工单子项维修内容
|
||||
|
export function repairOrderDetailCreate(data,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.post('/eam/equipment-repair-job-detail/create', data) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.post('/eam/equipment-repair-job-detail/create', data) |
||||
|
} |
||||
|
} |
||||
|
// 编辑维修工单子项维修内容
|
||||
|
export function repairOrderDetailUpdate(data,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.put('/eam/equipment-repair-job-detail/update', data) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.put('/eam/equipment-repair-job-detail/update', data) |
||||
|
} |
||||
|
} |
||||
|
// 获得维修工单子列表
|
||||
|
export function repairOrderDetailList(params,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.get('/eam/equipment-repair-job-detail/page', {params}) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.get('/eam/equipment-repair-job-detail/page', {params}) |
||||
|
} |
||||
|
} |
||||
|
// 删除维修工单子
|
||||
|
export function repairOrderDetailDelete(id,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.delete('/eam/equipment-repair-job-detail/delete?id=' + id) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.delete('/eam/equipment-repair-job-detail/delete?id=' + id) |
||||
|
} |
||||
|
} |
||||
|
//转办
|
||||
|
export function transfer(params,type) { |
||||
|
if (type == 'DEVICE') { |
||||
|
return http.get('/eam/equipment-repair-job-main/turnTo', {params}) |
||||
|
} else if (type == 'EQUIPMENT') { |
||||
|
return http.get('/eam/equipment-repair-job-main/turnTo', {params}) |
||||
|
} |
||||
|
} |
||||
|
// 获取采取临时措施的维修工单
|
||||
|
export function repairOrderList(params) { |
||||
|
return http.get('/eam/equipment-repair-job-main/getList', { |
||||
|
params |
||||
|
}) |
||||
|
} |
||||
|
// 获取维修工单的报修信息
|
||||
|
export function getDeviceRepairDetailsByNumber(params) { |
||||
|
return http.get('/eam/device-repair-request/getDetailsByNumber', { |
||||
|
params |
||||
|
}) |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
import http from '../http' |
||||
|
|
||||
|
// 备件领用列表
|
||||
|
export function sparePartsApplicationPage(params) { |
||||
|
return http.get('/eam/spare-parts-apply-main/page',{params}) |
||||
|
} |
||||
|
// 领用备件
|
||||
|
export function sparePartsApplicationCreate(data) { |
||||
|
return http.post('/eam/spare-parts-apply-main/create',data) |
||||
|
} |
||||
|
// 撤回领用备件
|
||||
|
export function sparePartsApplicationCancle(id) { |
||||
|
return http.get('/eam/spare-parts-apply-main/backout?id=' + id) |
||||
|
} |
||||
|
// 领用备件详情
|
||||
|
export function sparePartsApplicationDetail(masterId) { |
||||
|
return http.get('/eam/spare-parts-apply-detail/page?masterId=' + masterId) |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
import http from '../http' |
||||
|
|
||||
|
// 备件领用审批列表
|
||||
|
export function sparePartsApplicationApprovePage(params) { |
||||
|
return http.get('/eam/spare-parts-apply-main/page',{params}) |
||||
|
} |
||||
|
// 通过申请
|
||||
|
export function sparePartsApplicationAgree(id) { |
||||
|
return http.get('/eam/spare-parts-apply-main/agree?id='+id) |
||||
|
} |
||||
|
// 驳回申请
|
||||
|
export function sparePartsApplicationReject(id) { |
||||
|
return http.get('/eam/spare-parts-apply-main/disAgree?id='+id) |
||||
|
} |
@ -1,10 +1,10 @@ |
|||||
import http from './http' |
import http from '../http' |
||||
|
|
||||
// 领用备件
|
// 领用备件
|
||||
export function sparePartsServiceWorkOrderListCreate(data) { |
export function sparePartsServiceWorkOrderListCreate(data) { |
||||
return http.post('/eam/item-maintenance-record/create',data) |
return http.post('/eam/repair-spare-parts-request/create',data) |
||||
} |
} |
||||
// 备件维修列表
|
// 备件维修列表
|
||||
export function sparePartsServiceWorkOrderListPage(params) { |
export function sparePartsServiceWorkOrderListPage(params) { |
||||
return http.get('/eam/item-maintenance-record/getAppPage',{params}) |
return http.get('/eam/repair-spare-parts-request/page',{params}) |
||||
} |
} |
@ -0,0 +1,25 @@ |
|||||
|
import http from '../http' |
||||
|
// 根据模具号查询信息
|
||||
|
export function getToolDetailsByNumber(params) { |
||||
|
return http.get('/eam/tool/tool-accounts/get',{params}) |
||||
|
} |
||||
|
// 根据厂区查询模具
|
||||
|
export function getToolByFactoryAreaNumber(factoryAreaNumber) { |
||||
|
return http.get('/eam/tool/tool-accounts/noPage') |
||||
|
} |
||||
|
// 模具分页列表
|
||||
|
export function toolPage(params) { |
||||
|
return http.get('/eam/tool/tool-accounts/page',{params}) |
||||
|
} |
||||
|
// 模具列表
|
||||
|
export function toolList(params) { |
||||
|
return http.get('/eam/tool/tool-accounts/noPage',{params}) |
||||
|
} |
||||
|
// 模具列表不分页
|
||||
|
export function toolNoPage(params) { |
||||
|
return http.get('/eam/tool/tool-accounts/noPage',{params}) |
||||
|
} |
||||
|
// 新增申领备件时获取模具列表
|
||||
|
export function getApplyToolList() { |
||||
|
return http.get('/eam/tool/tool-accounts/noPage') |
||||
|
} |
@ -1,21 +0,0 @@ |
|||||
import http from './http' |
|
||||
// 根据模具号查询信息
|
|
||||
export function getMoldDetailsByNumber(params) { |
|
||||
return http.get('/eam/mold-accounts/getDetailsByNumber',{params}) |
|
||||
} |
|
||||
// 根据厂区查询模具
|
|
||||
export function getMoldByFactoryAreaNumber(factoryAreaNumber) { |
|
||||
return http.get('/eam/mold-accounts/selectData?factoryAreaNumber='+factoryAreaNumber) |
|
||||
} |
|
||||
// 模具分页列表
|
|
||||
export function moldPage(params) { |
|
||||
return http.get('/eam/mold-accounts/getAppPage',{params}) |
|
||||
} |
|
||||
// 模具列表
|
|
||||
export function moldList(params) { |
|
||||
return http.get('/eam/mold-accounts/selectData',{params}) |
|
||||
} |
|
||||
// 新增申领备件时获取模具列表
|
|
||||
export function getApplyMoldList() { |
|
||||
return http.get('/eam/item-accounts/selectAll') |
|
||||
} |
|
@ -1,47 +0,0 @@ |
|||||
import http from './http' |
|
||||
|
|
||||
|
|
||||
// 添加工单
|
|
||||
export function repairOrderCreate(data) { |
|
||||
return http.post('/eam/device-maintenance-job-main/create',data) |
|
||||
} |
|
||||
// 编辑工单
|
|
||||
export function repairOrderUpdate(data) { |
|
||||
return http.put('/eam/device-maintenance-job-main/update',data) |
|
||||
} |
|
||||
// 工单列表
|
|
||||
export function repairOrderPage(params) { |
|
||||
return http.get('/eam/device-maintenance-job-main/getAppPage',{params}) |
|
||||
} |
|
||||
// 操作工单
|
|
||||
export function orderClick(params) { |
|
||||
return http.get('/eam/device-maintenance-job-main/orderClick',{params}) |
|
||||
} |
|
||||
// 添加维修工单子项维修内容
|
|
||||
export function repairOrderDetailCreate(data) { |
|
||||
return http.post('/eam/device-maintenance-job-detail/create',data) |
|
||||
} |
|
||||
// 编辑维修工单子项维修内容
|
|
||||
export function repairOrderDetailUpdate(data) { |
|
||||
return http.put('/eam/device-maintenance-job-detail/update',data) |
|
||||
} |
|
||||
// 获得维修工单子列表
|
|
||||
export function repairOrderDetailList(params) { |
|
||||
return http.get('/eam/device-maintenance-job-detail/selectListByNumber',{params}) |
|
||||
} |
|
||||
// 删除维修工单子
|
|
||||
export function repairOrderDetailDelete(id) { |
|
||||
return http.delete( '/eam/device-maintenance-job-detail/delete?id='+id) |
|
||||
} |
|
||||
//转办
|
|
||||
export function transfer(params) { |
|
||||
return http.get('/eam/device-maintenance-job-main/turnTo',{params}) |
|
||||
} |
|
||||
// 获取采取临时措施的维修工单
|
|
||||
export function repairOrderList(params) { |
|
||||
return http.get('/eam/device-maintenance-job-main/getList',{params}) |
|
||||
} |
|
||||
// 获取维修工单的报修信息
|
|
||||
export function getDeviceRepairDetailsByNumber(params) { |
|
||||
return http.get('/eam/device-repair-request/getDetailsByNumber',{params}) |
|
||||
} |
|
@ -1,18 +0,0 @@ |
|||||
import http from './http' |
|
||||
|
|
||||
// 备件领用列表
|
|
||||
export function sparePartsApplicationPage(params) { |
|
||||
return http.get('/eam/item-apply-request-main/getAppPage',{params}) |
|
||||
} |
|
||||
// 领用备件
|
|
||||
export function sparePartsApplicationCreate(data) { |
|
||||
return http.post('/eam/item-apply-request-main/create',data) |
|
||||
} |
|
||||
// 撤回领用备件
|
|
||||
export function sparePartsApplicationCancle(id) { |
|
||||
return http.get('/eam/item-apply-request-main/backout?id=' + id) |
|
||||
} |
|
||||
// 领用备件详情
|
|
||||
export function sparePartsApplicationDetail(number) { |
|
||||
return http.get('/eam/item-apply-request-main/appGetByNumber?number=' + number) |
|
||||
} |
|
@ -1,14 +0,0 @@ |
|||||
import http from './http' |
|
||||
|
|
||||
// 备件领用审批列表
|
|
||||
export function sparePartsApplicationApprovePage(params) { |
|
||||
return http.get('/eam/item-apply-request-main/getAppApprovePage',{params}) |
|
||||
} |
|
||||
// 通过申请
|
|
||||
export function sparePartsApplicationAgree(id) { |
|
||||
return http.get('/eam/item-apply-request-main/agree?id='+id) |
|
||||
} |
|
||||
// 驳回申请
|
|
||||
export function sparePartsApplicationReject(id) { |
|
||||
return http.get('/eam/item-apply-request-main/disAgree?id='+id) |
|
||||
} |
|
@ -0,0 +1,16 @@ |
|||||
|
import http from '../http' |
||||
|
|
||||
|
// 获取车间
|
||||
|
export function getWorkshopNoPage(params) { |
||||
|
return http.get('/wms/workshop/noPage',{params}) |
||||
|
} |
||||
|
|
||||
|
// 获取库区
|
||||
|
export function getAreaBasicInfoNoPage(params) { |
||||
|
return http.get('/wms/areabasic/list',{params}) |
||||
|
} |
||||
|
|
||||
|
// 获取库位
|
||||
|
export function getLocationBasicInfoNoPage(params) { |
||||
|
return http.get('/wms/locationgroup/list',{params}) |
||||
|
} |
@ -0,0 +1,245 @@ |
|||||
|
<template> |
||||
|
<!-- 维修工单 --> |
||||
|
<view class="container"> |
||||
|
<u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff' |
||||
|
:title="params.flag == 2 ? '报修确认' : '维修工单'"> |
||||
|
<template v-slot:right v-if="params.flag!='2'"> |
||||
|
<u-icon name="plus" color="#fff" size="36" style="padding-right: 30rpx;" @click="addForm" v-if="(params.type=='DEVICE'&&$auth.hasPermi('eam:device-maintenance-job-main:createAPP'))||(params.type==='MOLD'&&$auth.hasPermi('eam:mold-maintenance-job-main:createAPP'))||(params.type==='TECH'&&$auth.hasPermi('eam:tech-maintenance-job-main:createAPP'))"></u-icon> |
||||
|
</template> |
||||
|
</u-navbar> |
||||
|
<view class="list"> |
||||
|
<view class="item" v-for="(item,index) in list" :key="index" > |
||||
|
<view class="" @click="itemClick(item,index)"> |
||||
|
<view class="title"> |
||||
|
<view class="title-txt"> |
||||
|
{{item.maintenanceDesc}} |
||||
|
</view> |
||||
|
<u-tag text="待接单" v-if="item.status == 'PENDING'" bg-color='rgba(255,255,255,0)' color='#fe8463' border-color='#fe8463' type="primary" shape='circle'/> |
||||
|
<u-tag text="已撤回" v-else-if="item.status=='REJECTED'" bg-color='rgba(255,255,255,0)' color='#d7d7d7' border-color='#d7d7d7 ' type="warning" shape='circle'/> |
||||
|
<u-tag text="已转办" v-else-if="item.status=='TRANSFERRED'" bg-color='rgba(255,255,255,0)' color='#e01f54' border-color='#e01f54' type="success" shape='circle'/> |
||||
|
<u-tag text="已接单" v-else-if="item.status=='PECEIVED'" bg-color='rgba(255,255,255,0)' color='#005eaa' border-color='#005eaa ' type="error" shape='circle'/> |
||||
|
<u-tag text="已验证" v-else-if="item.status=='VERIFIED'" bg-color='rgba(255,255,255,0)' color='#2EC7C9' border-color='#2EC7C9' type="info" shape='circle'/> |
||||
|
<u-tag text="已完成" v-else-if="item.status=='COMPLETED'" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
||||
|
<u-tag text="报修人已确认" v-else-if="item.status=='APPLYPASS'" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
||||
|
</view> |
||||
|
<view class="dec"> |
||||
|
工单单号:<span>{{item.number}}</span> |
||||
|
</view> |
||||
|
<view class="dec"> |
||||
|
类型:<span>{{item.type=='DEVICE'?'设备':item.type=='TECH'?'工艺':'模具'}}</span> |
||||
|
</view> |
||||
|
<view class="dec"> |
||||
|
{{`${params.type=='DEVICE'?'设备':params.type=='TECH'?'工艺' : '模具'}`}}编号:<span>{{item.deviceNumber}}</span> |
||||
|
</view> |
||||
|
<view class="dec"> |
||||
|
{{`${params.type=='DEVICE'?'设备':params.type=='TECH'?'工艺' : '模具'}`}}名称:<span>{{item.name}}</span> |
||||
|
</view> |
||||
|
<view class="dec"> |
||||
|
所属厂区:<span>{{item.factoryAreaName}}</span> |
||||
|
</view> |
||||
|
<view class="dec"> |
||||
|
班次:<span>{{item.classesName}}</span> |
||||
|
</view> |
||||
|
<view class="dec"> |
||||
|
故障类型:<span>{{item.faultTypeName}}</span> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="bottom"> |
||||
|
<view class="time" style="flex: 1;"> |
||||
|
{{`${$time.formatDate(item.createTime)}`}} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view style="height: 94rpx;padding-top: 30rpx;"> |
||||
|
<u-loadmore :status="status" v-if="status != 'loadmore'" /> |
||||
|
</view> |
||||
|
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { |
||||
|
onLoad, |
||||
|
onShow, |
||||
|
onReachBottom |
||||
|
} from '@dcloudio/uni-app' |
||||
|
import { |
||||
|
ref, |
||||
|
getCurrentInstance, |
||||
|
nextTick |
||||
|
} from 'vue' |
||||
|
import * as repairOrderApi from "@/api/eam/repairOrder" |
||||
|
import { useCountStore } from '@/store' |
||||
|
|
||||
|
const { proxy } = getCurrentInstance() |
||||
|
// 获取自定义的store |
||||
|
const store = useCountStore() |
||||
|
const params = ref({ |
||||
|
pageNo: 1, |
||||
|
pageSize: 10, |
||||
|
type: '', |
||||
|
}) |
||||
|
const status = ref('loadmore') //是否显示没有更多了 |
||||
|
const list = ref([]) |
||||
|
function itemClick(item, index) { |
||||
|
proxy.$tab.navigateTo(`/pages/eam/repairOrder/detail?type=${params.value.type}&number=${item.number}`) |
||||
|
} |
||||
|
function addForm(item) { |
||||
|
proxy.$tab.navigateTo(`/pages/eam/repairOrder/addForm?type=${params.value.type}&data=${encodeURIComponent(JSON.stringify(item))}`) |
||||
|
} |
||||
|
|
||||
|
async function getList() { |
||||
|
if (status.value == 'nomore') return; |
||||
|
status.value = 'loading'; |
||||
|
proxy.$modal.loading('加载中') |
||||
|
await repairOrderApi.repairOrderPage(params.value,params.value.type).then((res) => { |
||||
|
proxy.$modal.closeLoading() |
||||
|
if (res.data.list.length > 0) { |
||||
|
list.value = list.value.concat(res.data.list); |
||||
|
params.value.pageNo++; |
||||
|
status.value = 'loadmore' |
||||
|
} else { |
||||
|
status.value = 'nomore' |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
proxy.$modal.closeLoading() |
||||
|
}) |
||||
|
} |
||||
|
onLoad((option) => { |
||||
|
if (option.type) params.value.type = option.type; |
||||
|
if (option.flag) params.value.flag = option.flag; |
||||
|
// nextTick(() => { |
||||
|
// // 重新渲染页面 |
||||
|
// if (option.flag) params.value.flag = option.flag; |
||||
|
// }); |
||||
|
}) |
||||
|
onShow(() => { |
||||
|
params.value.pageNo = 1 |
||||
|
list.value = [] |
||||
|
status.value = 'loadmore' |
||||
|
getList() |
||||
|
|
||||
|
}) |
||||
|
onReachBottom(() => { |
||||
|
getList() |
||||
|
}) |
||||
|
</script> |
||||
|
|
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.container{ |
||||
|
background: #f5f5f5; |
||||
|
min-height: 100vh; |
||||
|
} |
||||
|
.list { |
||||
|
background: #f5f5f5; |
||||
|
margin-top: 20rpx; |
||||
|
|
||||
|
.item { |
||||
|
padding: 30rpx 30rpx 0px 30rpx; |
||||
|
margin-top: 20rpx; |
||||
|
background: white; |
||||
|
|
||||
|
.title { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
padding-bottom: 20rpx; |
||||
|
|
||||
|
.title-txt { |
||||
|
color: #409eff; |
||||
|
font-weight: bold; |
||||
|
font-size: 36rpx; |
||||
|
width: 0px; |
||||
|
flex: 1; |
||||
|
word-wrap: break-word; |
||||
|
} |
||||
|
|
||||
|
.time { |
||||
|
color: #919191; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.dec { |
||||
|
padding-bottom: 20rpx; |
||||
|
|
||||
|
span { |
||||
|
color: #999999; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.last { |
||||
|
padding-bottom: 30rpx; |
||||
|
} |
||||
|
|
||||
|
.bottom { |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
border-top: 1px solid #E4E4E4; |
||||
|
padding: 20rpx 0px; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.list { |
||||
|
background: #f5f5f5; |
||||
|
margin-top: 20rpx; |
||||
|
|
||||
|
.item { |
||||
|
padding: 30rpx 30rpx 0px 30rpx; |
||||
|
margin-top: 20rpx; |
||||
|
background: white; |
||||
|
|
||||
|
.title { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
padding-bottom: 20rpx; |
||||
|
|
||||
|
.title-txt { |
||||
|
color: #409eff; |
||||
|
font-weight: bold; |
||||
|
font-size: 36rpx; |
||||
|
width: 0px; |
||||
|
flex: 1; |
||||
|
} |
||||
|
|
||||
|
.time { |
||||
|
color: #919191; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.dec { |
||||
|
padding-bottom: 20rpx; |
||||
|
|
||||
|
span { |
||||
|
color: #999999; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.last { |
||||
|
padding-bottom: 30rpx; |
||||
|
} |
||||
|
|
||||
|
.bottom { |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
border-top: 1px solid #E4E4E4; |
||||
|
padding: 20rpx 0px; |
||||
|
position: relative; |
||||
|
|
||||
|
|
||||
|
.button { |
||||
|
position: absolute; |
||||
|
right: 0rpx; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,90 @@ |
|||||
|
<template> |
||||
|
<view class="add-form-container"> |
||||
|
<view class="list"> |
||||
|
<view class="title"> |
||||
|
<span>*</span>我的报修 |
||||
|
</view> |
||||
|
<view class="add-btn"> |
||||
|
<u-button type="primary" @click="openDevice"><u-icon name="plus-circle" color="#ffffff" |
||||
|
size="36"></u-icon>设备报修</u-button> |
||||
|
</view> |
||||
|
<view class="add-btn"> |
||||
|
<u-button type="primary" @click="openTool"><u-icon name="plus-circle" color="#ffffff" |
||||
|
size="36"></u-icon>工装报修</u-button> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { |
||||
|
ref, |
||||
|
getCurrentInstance |
||||
|
} from 'vue' |
||||
|
const { proxy } = getCurrentInstance() |
||||
|
function openDevice() { |
||||
|
proxy.$tab.navigateTo(`/pages/eam/repairOrder/index?type=DEVICE&flag=2`) |
||||
|
} |
||||
|
function openTool() { |
||||
|
proxy.$tab.navigateTo(`/pages/eam/repairOrder/index?type=EQUIPMENT&flag=2`) |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
.add-form-container { |
||||
|
min-height: calc(100vh - 140rpx); |
||||
|
background: white; |
||||
|
padding: 0px 0rpx 140rpx; |
||||
|
} |
||||
|
|
||||
|
.list { |
||||
|
padding: 0rpx 30rpx; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
margin-bottom: 20rpx; |
||||
|
|
||||
|
.item-box { |
||||
|
background: #F5F5F5; |
||||
|
border-radius: 12rpx; |
||||
|
flex: 1; |
||||
|
width: 0rpx; |
||||
|
} |
||||
|
|
||||
|
.spare-title { |
||||
|
padding: 20rpx 30rpx; |
||||
|
border-bottom: 1px solid #e4e4e4; |
||||
|
|
||||
|
.title-txt { |
||||
|
color: #409eff; |
||||
|
font-size: 30rpx; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.dec { |
||||
|
color: #9c9c9c; |
||||
|
padding: 20rpx 30rpx 20rpx; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
.title { |
||||
|
padding: 32rpx 0rpx; |
||||
|
position: relative; |
||||
|
|
||||
|
span { |
||||
|
position: absolute; |
||||
|
left: -16rpx; |
||||
|
color: #fa3534; |
||||
|
top: 19px; |
||||
|
} |
||||
|
} |
||||
|
.add-btn { |
||||
|
display: flex; |
||||
|
justify-content: flex-start; |
||||
|
align-items: center; |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
|
||||
|
</style> |
@ -0,0 +1,226 @@ |
|||||
|
<template> |
||||
|
<!-- 设备 --> |
||||
|
<view class="work-container"> |
||||
|
<view class="cartNull" v-show="!token"> |
||||
|
还没有登录,请<navigator open-type="navigate" url="/pages/login">先登录</navigator> |
||||
|
</view> |
||||
|
<view class="" v-show='token'> |
||||
|
<Search :searchData='searchData' @search='search' @screen='screen' :isShowScreen='false' /> |
||||
|
<view class="list"> |
||||
|
<view class="item" v-for="(item,index) in list" :key='index'> |
||||
|
<u-image :src="item.images" width='160' height="160"> |
||||
|
<template v-slot:error> |
||||
|
<view class="image-error"> |
||||
|
<u-icon name="photo" color="#c7c7c7" size="38"></u-icon> |
||||
|
<view style="font-size: 24rpx;">暂无图片</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
</u-image> |
||||
|
<view class="text"> |
||||
|
<view class="title"> |
||||
|
{{item.name}} |
||||
|
</view> |
||||
|
<view class="dec1"> |
||||
|
备件编码:{{item.itemNumber}} |
||||
|
</view> |
||||
|
<view class="dec2"> |
||||
|
总库存:{{item.qty}} |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view style="height: 94rpx;padding-top: 30rpx;"> |
||||
|
<u-loadmore :status="status" v-if="status != 'loadmore'" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { |
||||
|
onShow, |
||||
|
onReachBottom |
||||
|
} from '@dcloudio/uni-app' |
||||
|
import { |
||||
|
ref, |
||||
|
getCurrentInstance |
||||
|
} from 'vue' |
||||
|
import { |
||||
|
getAccessToken |
||||
|
} from '@/utils/auth' |
||||
|
import * as sparePartsApi from "@/api/eam/spareParts.js" |
||||
|
import Search from '../../../components/search/index.vue' |
||||
|
const { proxy } = getCurrentInstance() |
||||
|
const params = ref({ |
||||
|
pageNo: 1, |
||||
|
pageSize: 10, |
||||
|
type: '', |
||||
|
name: '' |
||||
|
}) |
||||
|
const status = ref('loadmore') //是否显示没有更多了 |
||||
|
const list = ref([]) |
||||
|
const token = ref('') |
||||
|
const searchData = ref({ |
||||
|
placeholder:'请输入备件名称' |
||||
|
}) |
||||
|
// 搜索 |
||||
|
function search(keyWord) { |
||||
|
params.value.name = keyWord |
||||
|
params.value.pageNo = 1 |
||||
|
list.value = [] |
||||
|
status.value = 'loadmore' |
||||
|
getList() |
||||
|
} |
||||
|
function screen() { |
||||
|
proxy.$tab.navigateTo(`/pages/device/screen`) |
||||
|
} |
||||
|
function getList() { |
||||
|
if (status.value == 'nomore') return; |
||||
|
status.value = 'loading'; |
||||
|
proxy.$modal.loading('加载中') |
||||
|
sparePartsApi.getSparePartsPage(params.value).then((res) => { |
||||
|
proxy.$modal.closeLoading() |
||||
|
console.log(res) |
||||
|
if (res.data.list.length > 0) { |
||||
|
list.value = list.value.concat(res.data.list); |
||||
|
params.value.pageNo++; |
||||
|
status.value = 'loadmore' |
||||
|
} else { |
||||
|
status.value = 'nomore' |
||||
|
} |
||||
|
}).catch(() => { }) |
||||
|
} |
||||
|
onShow(() => { |
||||
|
if (getAccessToken()) { |
||||
|
token.value = getAccessToken() |
||||
|
params.value.pageNo = 1 |
||||
|
list.value = [] |
||||
|
status.value = 'loadmore' |
||||
|
getList() |
||||
|
} |
||||
|
}) |
||||
|
onReachBottom(() => { |
||||
|
getList() |
||||
|
}) |
||||
|
// export default { |
||||
|
// components: { |
||||
|
// Search |
||||
|
// }, |
||||
|
// data() { |
||||
|
// return { |
||||
|
|
||||
|
// searchData: { |
||||
|
// placeholder: '请输入备件名称' |
||||
|
// }, |
||||
|
// params: { |
||||
|
// pageNo: 1, |
||||
|
// pageSize: 10, |
||||
|
// type: '', |
||||
|
// name: '' |
||||
|
// }, |
||||
|
// status: 'loadmore', //是否显示没有更多了 |
||||
|
// list: [], |
||||
|
// token: '' |
||||
|
// } |
||||
|
// }, |
||||
|
// methods: { |
||||
|
// // 搜索 |
||||
|
// // 搜索 |
||||
|
// search(keyWord) { |
||||
|
// this.params.name = keyWord |
||||
|
// this.params.pageNo = 1 |
||||
|
// this.list = [] |
||||
|
// this.status = 'loadmore' |
||||
|
// this.getList() |
||||
|
// }, |
||||
|
// // 筛选 |
||||
|
// screen() { |
||||
|
// this.$tab.navigateTo(`/pages/spareParts/screen`) |
||||
|
// }, |
||||
|
// // 获取设备保修列表 |
||||
|
// getList() { |
||||
|
// if (this.status == 'nomore') return; |
||||
|
// this.status = 'loading'; |
||||
|
// this.$modal.loading('加载中') |
||||
|
// sparePartsApi.getSparePartsPage(this.params).then((res) => { |
||||
|
// this.$modal.closeLoading() |
||||
|
// if (res.data.list.length > 0) { |
||||
|
// this.list = this.list.concat(res.data.list); |
||||
|
// this.params.pageNo++; |
||||
|
// this.status = 'loadmore' |
||||
|
// } else { |
||||
|
// this.status = 'nomore' |
||||
|
// } |
||||
|
// }).catch(()=>{}) |
||||
|
// }, |
||||
|
// }, |
||||
|
// onShow() { |
||||
|
// if (getAccessToken()) { |
||||
|
// this.token = getAccessToken() |
||||
|
// this.params.pageNo = 1 |
||||
|
// this.list = [] |
||||
|
// this.status = 'loadmore' |
||||
|
// this.getList() |
||||
|
// } |
||||
|
// }, |
||||
|
// onReachBottom() { |
||||
|
// this.getList() |
||||
|
// } |
||||
|
// } |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.work-container{ |
||||
|
min-height: 100vh; |
||||
|
background: #f5f5f5; |
||||
|
} |
||||
|
.list { |
||||
|
padding-bottom: 20rpx; |
||||
|
|
||||
|
.item { |
||||
|
margin-top: 20rpx; |
||||
|
background: white; |
||||
|
padding: 30rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
|
||||
|
.text { |
||||
|
margin-left: 20rpx; |
||||
|
|
||||
|
.title { |
||||
|
font-size: 32rpx; |
||||
|
font-weight: bold; |
||||
|
word-wrap: break-word; |
||||
|
} |
||||
|
|
||||
|
.dec1 { |
||||
|
font-size: 28rpx; |
||||
|
margin-top: 16rpx; |
||||
|
color: #acacac; |
||||
|
} |
||||
|
|
||||
|
.dec2 { |
||||
|
font-size: 28rpx; |
||||
|
margin-top: 6rpx; |
||||
|
color: #acacac; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.image-error { |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.cartNull { |
||||
|
text-align: center; |
||||
|
padding: 500rpx 40rpx 0; |
||||
|
font-size: 28rpx; |
||||
|
color: #888; |
||||
|
} |
||||
|
|
||||
|
.cartNull navigator { |
||||
|
color: #2979ff; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,108 @@ |
|||||
|
<!-- components/CustomTableModal.vue --> |
||||
|
<template> |
||||
|
<u-popup v-model="localVisible" mode="center" border-radius="14"> |
||||
|
<view class="popup-title">{{ title }}</view> |
||||
|
<u-list @scrolltolower="scrolltolower" class="popup"> |
||||
|
<u-list-item v-for="(item, index) in tableData" :key="index" @click="handleRowClick(item)"> |
||||
|
<u-cell :title="`编号-${item.code}`"> |
||||
|
<u-avatar |
||||
|
slot="icon" |
||||
|
shape="square" |
||||
|
size="35" |
||||
|
:src="item.url" |
||||
|
customStyle="margin: -3px 5px -3px 0" |
||||
|
></u-avatar> |
||||
|
<view>{{ item.name }}</view> |
||||
|
<view>库存: {{ item.qty }}</view> |
||||
|
</u-cell> |
||||
|
</u-list-item> |
||||
|
</u-list> |
||||
|
<view class="popup-footer"> |
||||
|
<u-button @click="cancel">取消</u-button> |
||||
|
<u-button type="primary" @click="confirmSelection">确认</u-button> |
||||
|
</view> |
||||
|
</u-popup> |
||||
|
</template> |
||||
|
|
||||
|
<script setup lang="ts"> |
||||
|
import { ref, watch, defineProps, defineEmits } from 'vue'; |
||||
|
|
||||
|
const props = defineProps({ |
||||
|
visible: { |
||||
|
type: Boolean, |
||||
|
required: true |
||||
|
}, |
||||
|
list: { |
||||
|
type: Array, |
||||
|
required: true |
||||
|
}, |
||||
|
title: { |
||||
|
type: String, |
||||
|
default: '选择项目' |
||||
|
} |
||||
|
}); |
||||
|
const emits = defineEmits(['update:visible', 'confirm']); |
||||
|
const localVisible = ref(false); |
||||
|
const selectedRow = ref(null); |
||||
|
const tableData = ref([]); |
||||
|
|
||||
|
watch(() => props.visible, (newVal) => { |
||||
|
localVisible.value = newVal; |
||||
|
}); |
||||
|
watch(() => props.list, (newList) => { |
||||
|
tableData.value = newList.map((item, index) => ({ |
||||
|
...item, |
||||
|
url: item.filePathList |
||||
|
})); |
||||
|
}); |
||||
|
watch(localVisible, (newVal) => { |
||||
|
emits('update:visible', newVal); |
||||
|
}); |
||||
|
|
||||
|
const handleRowClick = (row: any) => { |
||||
|
selectedRow.value = row; |
||||
|
}; |
||||
|
const cancel = () => { |
||||
|
localVisible.value = false; |
||||
|
}; |
||||
|
const confirmSelection = () => { |
||||
|
if (selectedRow.value) { |
||||
|
emits('confirm', selectedRow.value); |
||||
|
localVisible.value = false; |
||||
|
} else { |
||||
|
alert('请选择一行'); |
||||
|
} |
||||
|
}; |
||||
|
const scrolltolower = () => { |
||||
|
loadmore(); |
||||
|
}; |
||||
|
const loadmore = () => { |
||||
|
for (let i = 0; i < 30; i++) { |
||||
|
tableData.value.push({ |
||||
|
code: tableData.value.length + 1, |
||||
|
name: 'Item ' + (tableData.value.length + 1), |
||||
|
qty: Math.floor(Math.random() * 100), |
||||
|
url: 'https://cdn.uviewui.com/uview/album/' + ((tableData.value.length % 10) + 1) + '.jpg' |
||||
|
}); |
||||
|
} |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.popup-title { |
||||
|
text-align: center; |
||||
|
font-size: 32rpx; |
||||
|
font-weight: bold; |
||||
|
color: #409eff; |
||||
|
padding: 30rpx 30rpx 0px; |
||||
|
} |
||||
|
.popup-footer { |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
padding: 10px; |
||||
|
} |
||||
|
.popup { |
||||
|
width: 600rpx; |
||||
|
padding: 30rpx 0rpx 30rpx; |
||||
|
} |
||||
|
</style> |
@ -1,8 +1,9 @@ |
|||||
let request_url = "http://dev.ccwin-in.com:25102/api/admin-api" |
let request_url = "http://dev.ccwin-in.com:25102/api/admin-api" |
||||
|
let upload_url = "http://localhost:12080/admin-api" |
||||
let isDevelopment = true |
let isDevelopment = true |
||||
|
|
||||
export default { |
export default { |
||||
|
upload_url, |
||||
request_url, |
request_url, |
||||
isDevelopment |
isDevelopment |
||||
} |
} |
||||
|
Loading…
Reference in new issue