zouyanyan 8 months ago
commit 335900be6a

7
.gitignore vendored

@ -0,0 +1,7 @@
node_modules
.DS_Store
.history
/.idea/
unpackage
hbuilderx
.hbuilderx

@ -0,0 +1,290 @@
<script>
// 引入检查更新
//import checkupdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update.js"
//引进检查版本
// import callCheckVersion from '@/uni_modules/uni-upgrade-center-app/utils/call-check-version';
//#ifdef APP-PLUS
// const jpushModule = uni.requireNativePlugin('JG-JPush');
//#endif
export default {
async onLaunch() {
//#ifdef H5
var token= uni.getStorageSync("token");
if(token){
return false;
}
const queryString = window.location.search;
const searchParams = new URLSearchParams(queryString);
var ticket = searchParams.get('ticket');
console.log("ticket",ticket);
if(!ticket){
const query = window.location.hash.split('?')[1]; // 获取hash后面的查询字符串
const params = new URLSearchParams(query); // 创建一个URLSearchParams对象
ticket=params.get('ticket');
}
// alert(ticket)
if(ticket){
uni.showLoading({
title: '登录跳转中...'
});
// const {data: res} = await uni.$http.post('/loginBySSO?ticket='+ticket);
// if(res.success){
// if(res.data){
// console.log(res.data)
// uni.setStorageSync('expires', res.data.expires);
// uni.setStorageSync('token', res.data.token);
// uni.setStorageSync('user', JSON.stringify(res.data.user));
// uni.setStorageSync('menu', JSON.stringify(res.data.btns));
// this.getdept();
// // 跳转 首页
// uni.switchTab({
// url: '/pages/index/index'
// });
// }
// else{
// uni.showModal({
// title: '提示',
// content: '获取登录token失败,请重新登录后进入!',
// cancelText: '取消',
// confirmText: '确定',
// success: ress => {
// }
// });
// }
// }
// else{
// uni.showModal({
// title: '提示',
// content: '获取登录token失败,请重新登录后进入!',
// cancelText: '取消',
// confirmText: '确定',
// success: ress => {
// }
// });
// }
uni.request({
header: {
"Content-Type": "application/json",
"Accept": "application/json"
},
url: 'https://pallet.dsic.cn/api/api/loginBySSO?ticket='+ticket,
data:{
"ticket":ticket
},
method: "POST",
success: res => {
console.log(res);
if(res.data){
console.log(res.data)
var data=res.data;
if(data.data){
var datas=data.data;
uni.setStorageSync('expires', datas.expires);
uni.setStorageSync('token', datas.token);
uni.setStorageSync('user', JSON.stringify(datas.user));
uni.setStorageSync('menu', JSON.stringify(datas.user.btns));
this.getdept();
// 跳转 首页
uni.switchTab({
url: '/pages/index/index'
});
}
else{
uni.showModal({
title: '提示',
content: '获取登录token失败,请重新登录后进入!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
}
});
}
}
else{
uni.showModal({
title: '提示',
content: '获取登录token失败,请重新登录后进入!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
}
});
}
},
fail: err => {
console.log("err",err);
uni.showModal({
title: '提示',
content: '获取登录token请求失败,请重新登录后进入!',
cancelText: '取消',
confirmText: '确定',
success: ress => {
}
});
}
});
}
//#endif
// 判断版本更新 需要真机进行测试
//checkupdate();
//#ifdef APP-PLUS
// // 消息推送
// jpushModule.setLoggerEnable(true);
// jpushModule.initJPushService()
// jpushModule.addConnectEventListener(result=>{
// let connectEnable = result.connectEnable
// console.log("jpush连接", connectEnable)
// });
// jpushModule.addTagAliasListener(result => {
// let code = result.code
// let sequence = result.sequence
// let tags = result.tags
// let tag = result.tag
// let tagEnable = result.tagEnable
// let alias = result.alias
// console.log(alias, '别名')
// });
// // 通知事件回调
// jpushModule.addNotificationListener(result => {
// let notificationEventType = result.notificationEventType
// let messageID = result.messageID
// let title = result.title
// let content = result.content
// let extras = result.extras
// console.log("通知", result)
// // 点击事件
// if (notificationEventType == 'notificationOpened') {
// uni.reLaunch({
// url: `/pages/message/newMsg`
// });
// }
// })
// jpushModule.getRegistrationID(result => {
// console.log("注册ID", result.registerID)
// if (result.registerID) {
// uni.setStorageSync("register_id", result.registerID)
// }
// })
// jpushModule.addCustomMessageListener(result => {
// let messageID = result.messageID
// let content = result.content
// let extras = result.extras
// console.log("自定义消息", result)
// })
//#endif
},
methods: {
async getdept(){
var user= JSON.parse(uni.getStorageSync("user"));
var bmbm=user.bmbm?user.bmbm:"";
const {data: res} = await uni.$http.get('/getCommonData');
if(res.success){
if(res.data){
// 缓存部门
uni.setStorageSync('commondata', JSON.stringify(res.data));
if(res.data.depts){
res.data.depts.forEach((item, ii) => {
if(item.departCode==bmbm){
uni.setStorageSync('bmmc', item.departName);
}
});
}
}
}
},
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import "uview-ui/index.scss";
@import "common/demo.scss";
@import 'colorui/main.css';
@import 'colorui/icon.css';
body{
font-family: 'FZLTZHUNHJW--GB1-0';
}
.selright {
height: 100%;
background: url("@/static/images/xiayiji.png") no-repeat center right;
background-size: auto 80%;
padding-right: 50rpx !important;
text-align: right !important;
display: flex;
flex: 1;
align-items: flex-end;
justify-content: flex-end;
}
.rightc {
height: 100%;
padding-right: 10rpx !important;
text-align: right !important;
display: flex;
flex: 1;
align-items: flex-end;
justify-content: flex-end;
}
.wrapnob{
margin: 0;
padding: 0;
width: 100%;
position: relative;
height: calc(100vh);
/* #ifdef H5 */
height: calc(100vh - var(--window-top));
/* #endif */
}
.wrap{
margin: 0;
padding: 0;
width: 100%;
position: relative;
height: calc(100vh);
/* #ifdef H5 */
height: calc(100vh - var(--window-top) - var(--window-bottom));
/* #endif */
overflow-y: auto;
}
.page {
position: relative;
width: 100%;
padding: 0;
margin-top: 0;
overflow: hidden;
.back{
width: 100%;
height: calc(100vh - var(--window-top)) !important;
position: absolute;
top:0;
left:0;
background: url('@/static/images/pagebackimg.jpg') no-repeat top center;
background-size: 100% 100%;
}
}
.page-box{
padding-bottom:20rpx;
}
.imgload{
background-image: url('/static/images/tx.png');
background-size: 66% auto;
background-position: center center;
background-repeat: no-repeat;
}
::v-deep .uni-system-preview-image{
z-index: 9999999;
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -0,0 +1,39 @@
// 正式环境
const apiurl = 'http://xzapp.runpengsoft.com';
const install = (Vue, vm) => {
// 图片域名链接--正式环境
let imgurl = 'http://xzapp.runpengsoft.com';
// 获取验证码
let sendSms = (params = {}) => vm.$u.post('/api/sendSms',params);
// 登录
let login = (params = {}) => vm.$u.post(`/api/login`, params);
// body 中传参数
// let login = (data = {}, params = {}) => vm.$u.post(`/api/login`, params);
//用户删除
let removeUserNew = (params = {}) => vm.$u.delete(`/uc/api/userInfo/v1/?ids=${params}`);
let saveUserBaseInfoPC = (params = {}) => vm.$u.put(`/uc/api/userInfo/v1/`,params);
let addEquipment= (params = {}) => vm.$u.post(`/server/ywgl/equipment/v1/`,params);
let getDepartOrTeamDetail= (params = {}) => vm.$u.get(`/server/ywgl/orgExt/v1/org/${params}`);
let employeeList=(params = {}) => vm.$u.post(`/server/ywgl/relevant/v1/employee/list?${params}`,);
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = {
imgurl,
sendSms,
login,
removeUserNew,
saveUserBaseInfoPC,
addEquipment,
getDepartOrTeamDetail,
employeeList
};
}
export default {
apiurl,
install
}

@ -0,0 +1,95 @@
const Base64 = {
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
encode: function(e) {
var t = "";
var n, r, i, s, o, u, a;
var f = 0;
e = Base64._utf8_encode(e);
while (f < e.length) {
n = e.charCodeAt(f++);
r = e.charCodeAt(f++);
i = e.charCodeAt(f++);
s = n >> 2;
o = (n & 3) << 4 | r >> 4;
u = (r & 15) << 2 | i >> 6;
a = i & 63;
if (isNaN(r)) {
u = a = 64
} else if (isNaN(i)) {
a = 64
}
t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a)
}
return t
},
decode: function(e) {
var t = "";
var n, r, i;
var s, o, u, a;
var f = 0;
e = e.replace(/[^A-Za-z0-9+/=]/g, "");
while (f < e.length) {
s = this._keyStr.indexOf(e.charAt(f++));
o = this._keyStr.indexOf(e.charAt(f++));
u = this._keyStr.indexOf(e.charAt(f++));
a = this._keyStr.indexOf(e.charAt(f++));
n = s << 2 | o >> 4;
r = (o & 15) << 4 | u >> 2;
i = (u & 3) << 6 | a;
t = t + String.fromCharCode(n);
if (u != 64) {
t = t + String.fromCharCode(r)
}
if (a != 64) {
t = t + String.fromCharCode(i)
}
}
t = Base64._utf8_decode(t);
return t
},
_utf8_encode: function(e) {
e = e.replace(/rn/g, "n");
var t = "";
for (var n = 0; n < e.length; n++) {
var r = e.charCodeAt(n);
if (r < 128) {
t += String.fromCharCode(r)
} else if (r > 127 && r < 2048) {
t += String.fromCharCode(r >> 6 | 192);
t += String.fromCharCode(r & 63 | 128)
} else {
t += String.fromCharCode(r >> 12 | 224);
t += String.fromCharCode(r >> 6 & 63 | 128);
t += String.fromCharCode(r & 63 | 128)
}
}
return t
},
_utf8_decode: function(e) {
var t = "";
var n = 0;
var r = 0;
var c1 =0;
var c2 =0;
var c3 =0;
while (n < e.length) {
r = e.charCodeAt(n);
if (r < 128) {
t += String.fromCharCode(r);
n++
} else if (r > 191 && r < 224) {
c2 = e.charCodeAt(n + 1);
t += String.fromCharCode((r & 31) << 6 | c2 & 63);
n += 2
} else {
c2 = e.charCodeAt(n + 1);
c3 = e.charCodeAt(n + 2);
t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);
n += 3
}
}
return t
}
}
export default Base64

File diff suppressed because one or more lines are too long

@ -0,0 +1,222 @@
export default[
{
"name": "综合管理",
"foods": [
{
"name": "人员资质",
"key": "人员资质",
"icon": "../../static/images/zhgl/ryzz.jpg",
"cat": 10
},
{
"name": "设备信息",
"key": "设备信息",
"icon": "../../static/images/zhgl/sbxx.jpg",
"cat": 10
},
{
"name": "设备维修",
"key": "设备维修",
"icon": "../../static/images/zhgl/sbwx.jpg",
"cat": 10
},
{
"name": "巡查记录",
"key": "巡查记录",
"icon": "../../static/images/zhgl/xcjl.png",
"cat": 10
},
{
"name": "隐患上报",
"key": "隐患上报",
"icon": "../../static/images/zhgl/yhsb.png",
"cat": 10
},
{
"name": "硬件报修",
"key": "硬件报修",
"icon": "../../static/images/zhgl/yjbx.png",
"cat": 10
}
]
},
{
"name": "生产管控",
"foods": [
{
"name": "图纸接收",
"key": "图纸接收",
"icon": "../../static/images/btn_scgk.png",
"cat": 6
},
{
"name": "涂装接收",
"key": "涂装接收",
"icon": "../../static/images/btn_scgk.png",
"cat": 6
},
{
"name": "入库接收",
"key": "入库接收",
"icon": "../../static/images/btn_scgk.png",
"cat": 6
},
{
"name": "设备运行",
"key": "设备运行",
"icon": "../../static/images/btn_scgk.png",
"cat": 6
},
{
"name": "结构反馈",
"key": "结构反馈",
"icon": "../../static/images/btn_scgk.png",
"cat": 6
},
{
"name": "镀锌反馈",
"key": "镀锌反馈",
"icon": "../../static/images/btn_scgk.png",
"cat": 6
},
{
"name": "下料工序",
"key": "下料工序",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "弯曲工序",
"key": "弯曲工序",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "平台工序",
"key": "平台工序",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "焊接工序",
"key": "焊接工序",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "清理工序",
"key": "清理工序",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "工时统计",
"key": "眉妆",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "处理接收",
"key": "处理接收",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "处理完工",
"key": "处理完工",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "处理完工(部件)",
"key": "处理完工(部件)",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "集配入库",
"key": "集配入库",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "集配入库(部件)",
"key": "集配入库(部件)",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
},
{
"name": "问题反馈",
"key": "问题反馈",
"icon": "../../static/images/btn_scgk.png",
"cat": 3
}
]
},
{
"name": "配送交接",
"foods": [
{
"name": "配送接收",
"key": "配送接收",
"icon": "../../static/images/psjj/btn_jj01.jpg",
"cat": 3
},
{
"name": "需求计划",
"key": "需求计划",
"icon": "../../static/images/psjj/btn_jj01.jpg",
"cat": 3
},
{
"name": "配送计划",
"key": "配送计划",
"icon": "../../static/images/psjj/btn_jj01.jpg",
"cat": 3
},
{
"name": "问题跟踪",
"key": "问题跟踪",
"icon": "../../static/images/psjj/btn_jj02.jpg",
"cat": 3
},
{
"name": "信息反馈",
"key": "信息反馈",
"icon": "../../static/images/psjj/btn_jj03.jpg",
"cat": 3
},
{
"name": "舾装日报",
"key": "舾装日报",
"icon": "../../static/images/psjj/btn_jj04.jpg",
"cat": 3
},
{
"name": "特殊管件",
"key": "特殊管件",
"icon": "../../static/images/psjj/btn_jj05.jpg",
"cat": 3
}
]
},
{
"name": "网上办公",
"foods": [
{
"name": "公务用车",
"key": "公务用车",
"icon": "../../static/images/btn_scgk.png",
"cat": 4
},
{
"name": "船东食堂",
"key": "船东食堂",
"icon": "../../static/images/btn_scgk.png",
"cat": 4
}
]
},
]

@ -0,0 +1,86 @@
/* #ifndef APP-NVUE */
view,
text {
box-sizing: border-box;
}
/* #endif */
/* start--演示页面使用的统一样式--start */
.u-demo {
padding: 25px 20px;
}
.u-demo-wrap {
border-width: 1px;
border-color: #ddd;
border-style: dashed;
background-color: rgb(250, 250, 250);
padding: 20px 10px;
border-radius: 3px;
}
.u-demo-area {
text-align: center;
}
.u-no-demo-here {
color: $u-tips-color;
font-size: 13px;
}
.u-demo-result-line {
border-width: 1px;
border-color: #ddd;
border-style: dashed;
padding: 5px 20px;
margin-top: 30px;
border-radius: 5px;
background-color: rgb(240, 240, 240);
color: $u-content-color;
font-size: 16px;
/* #ifndef APP-NVUE */
word-break: break-word;
display: inline-block;
/* #endif */
text-align: left;
}
.u-demo-title,
.u-config-title {
text-align: center;
font-size: 16px;
font-weight: bold;
margin-bottom: 20px;
}
.u-config-item {
margin-top: 25px;
}
.u-config-title {
margin-top: 20px;
padding-bottom: 5px;
}
.u-item-title {
position: relative;
font-size: 15px;
padding-left: 8px;
line-height: 1;
margin-bottom: 11px;
}
.u-item-title:after {
position: absolute;
width: 4px;
top: -1px;
height: 16px;
/* #ifndef APP-NVUE */
content: '';
/* #endif */
left: 0;
border-radius: 10px;
background-color: $u-content-color;
}
/* end--演示页面使用的统一样式--end */

@ -0,0 +1,22 @@
// 如果没有通过拦截器配置域名的话,可以在这里写上完整的URL(加上域名部分)
let hotSearchUrl = '/ebapi/store_api/hot_search';
let indexUrl = '/ebapi/public_api/index';
// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分:
// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
const install = (Vue, vm) => {
// 此处没有使用传入的params参数
let getSearch = (params = {}) => vm.$u.get(hotSearchUrl, {
id: 2
});
// 此处使用了传入的params参数,一切自定义即可
let getInfo = (params = {}) => vm.$u.post(indexUrl, params);
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = {getSearch, getInfo};
}
export default {
install
}

@ -0,0 +1,60 @@
// 这里的vm,就是我们在vue文件里面的this,所以我们能在这里获取vuex的变量,比如存放在里面的token
// 同时,我们也可以在此使用getApp().globalData,如果你把token放在getApp().globalData的话,也是可以使用的
const install = (Vue, vm) => {
Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://spwy-test.spacecig.com',
// baseUrl: 'https://api.youzixy.com',
// 如果将此值设置为true,拦截回调中将会返回服务端返回的所有数据response,而不是response.data
// 设置为true后,就需要在this.$u.http.interceptor.response进行多一次的判断,请打印查看具体值
// originalData: true,
// 设置自定义头部content-type
header: {
'content-type': 'application/json'
}
});
// 请求拦截,配置Token等参数
Vue.prototype.$u.http.interceptor.request = (config) => {
if(config.url=='/uc/auth'){
config.header.Authorization =''
}else{
config.header.Authorization = uni.getStorageSync('token') ? `Bearer ${uni.getStorageSync('token')}` :"";
}
// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
// config.header.token = vm.token;
// 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
// config.header.token = vm.$store.state.token;
// 方式三,如果token放在了globalData,通过getApp().globalData获取
// config.header.token = getApp().globalData.username;
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
// const token = uni.getStorageSync('token');
// config.header.token = token;
return config;
}
// 响应拦截,判断状态码是否通过
Vue.prototype.$u.http.interceptor.response = (res) => {
// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
if (res.state) {
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
return res.value;
} else if (res.token || res.page) {
return res;
} else if (Array.isArray(res)) {
return res;
}
else if(res){
return res;
}
else {
return false;
}
}
}
export default {
install
}

@ -0,0 +1,585 @@
module.exports = {
list: [{
"letter": "A",
"data": [{
"name": "阿拉斯加",
"mobile": "13588889999",
"keyword": "阿拉斯加ABA13588889999"
},
{
"name": "阿克苏",
"mobile": "0551-4386721",
"keyword": "阿克苏AKESU0551-4386721"
},
{
"name": "阿拉善",
"mobile": "4008009100",
"keyword": "阿拉善ALASHAN4008009100"
},
{
"name": "阿勒泰",
"mobile": "13588889999",
"keyword": "阿勒泰ALETAI13588889999"
},
{
"name": "阿里",
"mobile": "13588889999",
"keyword": "阿里ALI13588889999"
},
{
"name": "安阳",
"mobile": "13588889999",
"keyword": "13588889999安阳ANYANG"
}
]
},
{
"letter": "B",
"data": [{
"name": "白城",
"mobile": "该主子没有留电话~",
"keyword": "白城BAICHENG"
},
{
"name": "白山",
"mobile": "13588889999",
"keyword": "白山BAISHAN13588889999"
},
{
"name": "白银",
"mobile": "13588889999",
"keyword": "白银BAIYIN13588889999"
},
{
"name": "保定",
"mobile": "13588889999",
"keyword": "保定BAODING13588889999"
}
]
},
{
"letter": "C",
"data": [{
"name": "沧州",
"mobile": "13588889999",
"keyword": "沧州CANGZHOU13588889999"
},
{
"name": "长春",
"mobile": "13588889999",
"keyword": "长春CHANGCHUN13588889999"
}
]
},
{
"letter": "D",
"data": [{
"name": "大理",
"mobile": "13588889999",
"keyword": "大理DALI13588889999"
},
{
"name": "大连",
"mobile": "13588889999",
"keyword": "大连DALIAN13588889999"
}
]
},
{
"letter": "E",
"data": [{
"name": "鄂尔多斯",
"mobile": "13588889999",
"keyword": "鄂尔多斯EERDUOSI13588889999"
},
{
"name": "恩施",
"mobile": "13588889999",
"keyword": "恩施ENSHI13588889999"
},
{
"name": "鄂州",
"mobile": "13588889999",
"keyword": "鄂州EZHOU13588889999"
}
]
},
{
"letter": "F",
"data": [{
"name": "防城港",
"mobile": "该主子没有留电话~",
"keyword": "防城港FANGCHENGGANG"
},
{
"name": "抚顺",
"mobile": "13588889999",
"keyword": "抚顺FUSHUN13588889999"
},
{
"name": "阜新",
"mobile": "13588889999",
"keyword": "阜新FUXIN13588889999"
},
{
"name": "阜阳",
"mobile": "13588889999",
"keyword": "阜阳FUYANG13588889999"
},
{
"name": "抚州",
"mobile": "13588889999",
"keyword": "抚州FUZHOU13588889999"
},
{
"name": "福州",
"mobile": "13588889999",
"keyword": "福州FUZHOU13588889999"
}
]
},
{
"letter": "G",
"data": [{
"name": "甘南",
"mobile": "13588889999",
"keyword": "甘南GANNAN13588889999"
},
{
"name": "赣州",
"mobile": "13588889999",
"keyword": "赣州GANZHOU13588889999"
},
{
"name": "甘孜",
"mobile": "13588889999",
"keyword": "甘孜GANZI13588889999"
}
]
},
{
"letter": "H",
"data": [{
"name": "哈尔滨",
"mobile": "13588889999",
"keyword": "哈尔滨HAERBIN13588889999"
},
{
"name": "海北",
"mobile": "13588889999",
"keyword": "海北HAIBEI13588889999"
},
{
"name": "海东",
"mobile": "13588889999",
"keyword": "海东HAIDONG13588889999"
},
{
"name": "海口",
"mobile": "13588889999",
"keyword": "海口HAIKOU13588889999"
}
]
},
{
"letter": "I",
"data": [{
"name": "ice",
"mobile": "13588889999",
"keyword": "佳木斯JIAMUSI13588889999"
}]
},
{
"letter": "J",
"data": [{
"name": "佳木斯",
"mobile": "13588889999",
"keyword": "佳木斯JIAMUSI13588889999"
},
{
"name": "吉安",
"mobile": "13588889999",
"keyword": "吉安JIAN13588889999"
},
{
"name": "江门",
"mobile": "13588889999",
"keyword": "江门JIANGMEN13588889999"
}
]
},
{
"letter": "K",
"data": [{
"name": "开封",
"mobile": "13588889999",
"keyword": "开封KAIFENG13588889999"
},
{
"name": "喀什",
"mobile": "13588889999",
"keyword": "喀什KASHI13588889999"
},
{
"name": "克拉玛依",
"mobile": "13588889999",
"keyword": "克拉玛依KELAMAYI13588889999"
}
]
},
{
"letter": "L",
"data": [{
"name": "来宾",
"mobile": "13588889999",
"keyword": "来宾LAIBIN13588889999"
},
{
"name": "兰州",
"mobile": "13588889999",
"keyword": "兰州LANZHOU13588889999"
},
{
"name": "拉萨",
"mobile": "13588889999",
"keyword": "拉萨LASA13588889999"
},
{
"name": "乐山",
"mobile": "13588889999",
"keyword": "乐山LESHAN13588889999"
},
{
"name": "凉山",
"mobile": "13588889999",
"keyword": "凉山LIANGSHAN13588889999"
},
{
"name": "连云港",
"mobile": "13588889999",
"keyword": "连云港LIANYUNGANG13588889999"
},
{
"name": "聊城",
"mobile": "18322223333",
"keyword": "聊城LIAOCHENG18322223333"
},
{
"name": "辽阳",
"mobile": "18322223333",
"keyword": "辽阳LIAOYANG18322223333"
},
{
"name": "辽源",
"mobile": "18322223333",
"keyword": "辽源LIAOYUAN18322223333"
},
{
"name": "丽江",
"mobile": "18322223333",
"keyword": "丽江LIJIANG18322223333"
},
{
"name": "临沧",
"mobile": "18322223333",
"keyword": "临沧LINCANG18322223333"
},
{
"name": "临汾",
"mobile": "18322223333",
"keyword": "临汾LINFEN18322223333"
},
{
"name": "临夏",
"mobile": "18322223333",
"keyword": "临夏LINXIA18322223333"
},
{
"name": "临沂",
"mobile": "18322223333",
"keyword": "临沂LINYI18322223333"
},
{
"name": "林芝",
"mobile": "18322223333",
"keyword": "林芝LINZHI18322223333"
},
{
"name": "丽水",
"mobile": "18322223333",
"keyword": "丽水LISHUI18322223333"
}
]
},
{
"letter": "M",
"data": [{
"name": "眉山",
"mobile": "15544448888",
"keyword": "眉山MEISHAN15544448888"
},
{
"name": "梅州",
"mobile": "15544448888",
"keyword": "梅州MEIZHOU15544448888"
},
{
"name": "绵阳",
"mobile": "15544448888",
"keyword": "绵阳MIANYANG15544448888"
},
{
"name": "牡丹江",
"mobile": "15544448888",
"keyword": "牡丹江MUDANJIANG15544448888"
}
]
},
{
"letter": "N",
"data": [{
"name": "南昌",
"mobile": "15544448888",
"keyword": "南昌NANCHANG15544448888"
},
{
"name": "南充",
"mobile": "15544448888",
"keyword": "南充NANCHONG15544448888"
},
{
"name": "南京",
"mobile": "15544448888",
"keyword": "南京NANJING15544448888"
},
{
"name": "南宁",
"mobile": "15544448888",
"keyword": "南宁NANNING15544448888"
},
{
"name": "南平",
"mobile": "15544448888",
"keyword": "南平NANPING15544448888"
}
]
},
{
"letter": "O",
"data": [{
"name": "欧阳",
"mobile": "15544448888",
"keyword": "欧阳ouyang15544448888"
}]
},
{
"letter": "P",
"data": [{
"name": "盘锦",
"mobile": "15544448888",
"keyword": "盘锦PANJIN15544448888"
},
{
"name": "攀枝花",
"mobile": "15544448888",
"keyword": "攀枝花PANZHIHUA15544448888"
},
{
"name": "平顶山",
"mobile": "15544448888",
"keyword": "平顶山PINGDINGSHAN15544448888"
},
{
"name": "平凉",
"mobile": "15544448888",
"keyword": "平凉PINGLIANG15544448888"
},
{
"name": "萍乡",
"mobile": "15544448888",
"keyword": "萍乡PINGXIANG15544448888"
},
{
"name": "普洱",
"mobile": "15544448888",
"keyword": "普洱PUER15544448888"
},
{
"name": "莆田",
"mobile": "15544448888",
"keyword": "莆田PUTIAN15544448888"
},
{
"name": "濮阳",
"mobile": "15544448888",
"keyword": "濮阳PUYANG15544448888"
}
]
},
{
"letter": "Q",
"data": [{
"name": "黔东南",
"mobile": "15544448888",
"keyword": "黔东南QIANDONGNAN15544448888"
},
{
"name": "黔南",
"mobile": "15544448888",
"keyword": "黔南QIANNAN15544448888"
},
{
"name": "黔西南",
"mobile": "15544448888",
"keyword": "黔西南QIANXINAN15544448888"
}
]
},
{
"letter": "R",
"data": [{
"name": "日喀则",
"mobile": "15544448888",
"keyword": "日喀则RIKAZE15544448888"
},
{
"name": "日照",
"mobile": "15544448888",
"keyword": "日照RIZHAO15544448888"
}
]
},
{
"letter": "S",
"data": [{
"name": "三门峡",
"mobile": "15544448888",
"keyword": "三门峡SANMENXIA15544448888"
},
{
"name": "三明",
"mobile": "15544448888",
"keyword": "三明SANMING15544448888"
},
{
"name": "三沙",
"mobile": "15544448888",
"keyword": "三沙SANSHA15544448888"
}
]
},
{
"letter": "T",
"data": [{
"name": "塔城",
"mobile": "15544448888",
"keyword": "塔城TACHENG15544448888"
},
{
"name": "漯河",
"mobile": "15544448888",
"keyword": "漯河TAHE15544448888"
},
{
"name": "泰安",
"mobile": "15544448888",
"keyword": "泰安TAIAN15544448888"
}
]
},
{
"letter": "W",
"data": [{
"name": "潍坊",
"mobile": "15544448888",
"keyword": "潍坊WEIFANG15544448888"
},
{
"name": "威海",
"mobile": "15544448888",
"keyword": "威海WEIHAI15544448888"
},
{
"name": "渭南",
"mobile": "15544448888",
"keyword": "渭南WEINAN15544448888"
},
{
"name": "文山",
"mobile": "15544448888",
"keyword": "文山WENSHAN15544448888"
}
]
},
{
"letter": "X",
"data": [{
"name": "厦门",
"mobile": "15544448888",
"keyword": "厦门XIAMEN15544448888"
},
{
"name": "西安",
"mobile": "15544448888",
"keyword": "西安XIAN15544448888"
},
{
"name": "湘潭",
"mobile": "15544448888",
"keyword": "湘潭XIANGTAN15544448888"
}
]
},
{
"letter": "Y",
"data": [{
"name": "雅安",
"mobile": "15544448888",
"keyword": "雅安YAAN15544448888"
},
{
"name": "延安",
"mobile": "15544448888",
"keyword": "延安YANAN15544448888"
},
{
"name": "延边",
"mobile": "15544448888",
"keyword": "延边YANBIAN15544448888"
},
{
"name": "盐城",
"mobile": "15544448888",
"keyword": "盐城YANCHENG15544448888"
}
]
},
{
"letter": "Z",
"data": [{
"name": "枣庄",
"mobile": "15544448888",
"keyword": "枣庄ZAOZHUANG15544448888"
},
{
"name": "张家界",
"mobile": "15544448888",
"keyword": "张家界ZHANGJIAJIE15544448888"
},
{
"name": "张家口",
"mobile": "15544448888",
"keyword": "张家口ZHANGJIAKOU15544448888"
}
]
},
{
"letter": "#",
"data": [{
"name": "其他.",
"mobile": "16666666666",
"keyword": "echo16666666666"
}]
}
]
}

@ -0,0 +1,21 @@
export default {
// 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分
components: {
desc: 'Numerous components cover the various requirements of the development process, and the components are rich in functions and compatible with multiple terminals. Let you integrate quickly, out of the box'
},
js: {
desc: 'Numerous intimate gadgets are a weapon that you can call upon during the development process, allowing you to dart in your hand and pierce the Yang with a hundred steps'
},
template: {
desc: 'Collection of many commonly used pages and layouts, reducing the repetitive work of developers, allowing you to focus on logic and get twice the result with half the effort'
},
nav: {
components: 'Components',
js: 'JS',
template: 'Template'
},
common: {
intro: 'UI framework for rapid development of multiple platforms',
title: 'uView UI',
},
}

@ -0,0 +1,21 @@
export default {
// 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分
components: {
desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用'
},
js: {
desc: '众多的贴心小工具,是你开发过程中召之即来的利器,让你飞镖在手,百步穿杨'
},
template: {
desc: '收集众多的常用页面和布局,减少开发者的重复工作,让你专注逻辑,事半功倍'
},
nav: {
components: '组件',
js: '工具',
template: '模板'
},
common: {
intro: '多平台快速开发的UI框架',
title: 'uView UI',
},
}

@ -0,0 +1,96 @@
var utils = {
//时间格式化
formatDate: (value) => {
let date = null;
if (!value) {
return date;
}
if (value.constructor == Date && !isNaN(value.getTime())) {
date = value;
}
else if (value.constructor == String || value.constructor == Number) {
date = new Date(value);
}
else {
throw "格式化日期时,传入的数据格式不正确。";
}
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
let h = date.getHours();
h = h < 10 ? ('0' + h) : h;
let m = date.getMinutes();
m = m < 10 ? ('0' + m) : m;
let s = date.getSeconds();
s = s < 10 ? ('0' + s) : s;
return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
},
format: (value) => {
let date = null;
if (!value) {
return date;
}
if (value.constructor == Date && !isNaN(value.getTime())) {
date = value;
}
else if (value.constructor == String || value.constructor == Number) {
date = new Date(value);
}
else {
throw "格式化日期时,传入的数据格式不正确。";
}
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? ('0' + MM) : MM;
let d = date.getDate();
d = d < 10 ? ('0' + d) : d;
return y + '/' + MM + '/' + d;
},
//字典数据根据key显示文字
dataFilter:(arr, val='')=> {
let name = "";
arr.forEach((item) => {
if (item.key == val) {
name = item.name;
}else{
name='--'
}
});
return name;
},
//列表转换为树格式
listtoTree:(data)=>{
let result = [];
if (!Array.isArray(data)) {
return result;
}
data.forEach((item) => {
delete item.children;
});
let map = {};
data.forEach((item) => {
map[item.id] = item;
});
data.forEach((item) => {
let parent = map[item.parentId];
if (parent) {
(parent.children || (parent.children = [])).push(item);
} else {
result.push(item);
}
});
return result;
},
getRemoteFile: (path) => {
return `http://218.24.131.92:18080/images/${path}`;
//return `https://xzapp.runpengsoft.com/images/${path}`;
}
}
// 格式化日期
export default utils;

File diff suppressed because one or more lines are too long

@ -0,0 +1,102 @@
<template>
<view>
<u-upload ref="uUpload" upload-text='' :width="width" :height='height' :max-size="45 * 1024 * 1024"
@on-success="success" :before-remove="beforeremove" :before-upload="handleBeforeUpload"
:deletable="deletable" :source-type="sourceType"
:action="action" :header="{ token: `${token}` }" :max-count="count"
:file-list="fileList">
</u-upload>
</view>
</template>
<script>
export default {
name: "UploadFile",
props: {
fileidList:{},
width:{},
height:{},
count:{ default:3},
sourceType: {
type: Array,
default() {
return ['album', 'camera'];
}
},
deletable:true
},
data() {
return {
ifinit:false,
fileId: [],
file: [],
propId: [],
action:'',
imgurl: uni.$http.baseUrl,
token: uni.getStorageSync("token"),
}
},
computed: {
fileList() {
var fileList = [];
if(this._props.fileidList && this._props.fileidList.length>0 && !this.ifinit){
this.ifinit=true;
this._props.fileidList.map(item => {
this.fileId.push(item);
fileList.push({
url: this.imgurl+'/images/'+item
})
});
}
return fileList;
}
},
mounted() {
this.action=this.imgurl+'/api/hseYhsbxx/uploadXjZp';
console.log(this.sourceType);
},
methods: {
handleBeforeUpload(file) {},
beforeremove(index) {
return new Promise((resolve, reject) => {
this.fileId.splice(index, 1);
this.$emit('picIds', this.fileId);
resolve();
// 调后端接口删除操作
// this.$u.api.removeFile(this.fileId[index]).then(res => {
// this.fileId.splice(index, 1)
// this.$emit('picIds', this.fileId)
// // resolve()之后,将会进入promise的组件内部的then回调,相当于返回true
// resolve();
// }).catch(err => {
// // reject()之后,将会进入promise的组件内部的catch回调,相当于返回false
// reject();
// })
})
},
success(file, val) {
var _this=this;
if(file.success&&file.data)
{
// console.log('file',file.data)
// file.data.forEach(item=>{
// if(!_this.fileId.includes(item)){
// _this.fileId.push(item);
// }
// });
// console.log( _this.fileId)
_this.fileId.push(file.data);
// console.log("success");
_this.$emit("picIds", _this.fileId);
}
},
},
}
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,112 @@
<template>
<view>
<u-upload ref="uUpload" upload-text='' :width="width" :height='height' :max-size="45 * 1024 * 1024" :custom-btn="true" :disabled="false"
@on-success="success" :before-remove="beforeremove" :before-upload="handleBeforeUpload"
:deletable="deletable" :source-type="sourceType" :show-progress="false"
:action="action" :header="{ token: `${token}` }" :max-count="count" >
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image class="img" src="../static/images/hedit.png" mode="aspectFill"></image>
</view>
</u-upload>
</view>
</template>
<script>
export default {
name: "UploadFile",
props: {
fileidList:{},
width:0,
height:0,
count:{ default:1},
edit: require("@/static/images/hedit.png"),
sourceType: {
type: Array,
default() {
return ['album', 'camera'];
}
},
deletable:false
},
data() {
return {
ifinit:false,
fileId: [],
file: [],
propId: [],
action:'',
imgurl:"http://218.24.131.92:18080",// "https://xzapp.runpengsoft.com",
token: uni.getStorageSync("token")
}
},
computed: {
fileList() {
var fileList = [];
if(this._props.fileidList && this._props.fileidList.length>0 && !this.ifinit){
this.ifinit=true;
this._props.fileidList.map(item => {
this.fileId.push(item);
fileList.push({
url: this.imgurl+'/images/'+item
})
});
}
return fileList;
}
},
mounted() {
this.action=this.imgurl+'/api/uploadRyzp';
console.log(this.sourceType);
},
methods: {
handleBeforeUpload(file) {},
beforeremove(index) {
return new Promise((resolve, reject) => {
this.fileId.splice(index, 1);
this.$emit('picIds', this.fileId);
resolve();
// 调后端接口删除操作
// this.$u.api.removeFile(this.fileId[index]).then(res => {
// this.fileId.splice(index, 1)
// this.$emit('picIds', this.fileId)
// // resolve()之后,将会进入promise的组件内部的then回调,相当于返回true
// resolve();
// }).catch(err => {
// // reject()之后,将会进入promise的组件内部的catch回调,相当于返回false
// reject();
// })
})
},
success(file, val) {
var _this=this;
if(file.success&&file.data)
{
// console.log('file',file.data)
// file.data.forEach(item=>{
// if(!_this.fileId.includes(item)){
// _this.fileId.push(item);
// }
// });
// console.log( _this.fileId)
_this.fileId.push(file.data);
// console.log("success");
_this.$emit("picIds", _this.fileId);
}
},
},
}
</script>
<style lang="scss" scoped>
.slot-btn{
width: 36rpx;
height: 36rpx;
}
.img{
width: 36rpx;
height: 36rpx;
}
</style>

@ -0,0 +1,102 @@
<template>
<view>
<u-upload ref="uUpload" :auto-upload="false" upload-text='' :width="width" :height='height' :max-size="45 * 1024 * 1024"
@on-success="success" :before-remove="beforeremove" :before-upload="handleBeforeUpload"
:deletable="deletable" :source-type="sourceType"
:action="action" :header="{ token: `${token}` }" :max-count="count"
:file-list="fileList">
</u-upload>
</view>
</template>
<script>
export default {
name: "UploadFile",
props: {
fileidList:{},
width:{},
height:{},
count:{ default:3},
sourceType: {
type: Array,
default() {
return ['album', 'camera'];
}
},
deletable:true
},
data() {
return {
ifinit:false,
fileId: [],
file: [],
propId: [],
action:'',
imgurl: uni.$http.baseUrl,
token: uni.getStorageSync("token")
}
},
computed: {
fileList() {
var fileList = [];
if(this._props.fileidList && this._props.fileidList.length>0 && !this.ifinit){
this.ifinit=true;
this._props.fileidList.map(item => {
this.fileId.push(item);
fileList.push({
url: this.imgurl+'/images/'+item
})
});
}
return fileList;
}
},
mounted() {
this.action=this.imgurl+'/api/xxClwx/uploadClwxZp';
console.log(this.sourceType);
},
methods: {
handleBeforeUpload(file) {},
beforeremove(index) {
return new Promise((resolve, reject) => {
this.fileId.splice(index, 1);
this.$emit('picIds', this.fileId);
resolve();
// 调后端接口删除操作
// this.$u.api.removeFile(this.fileId[index]).then(res => {
// this.fileId.splice(index, 1)
// this.$emit('picIds', this.fileId)
// // resolve()之后,将会进入promise的组件内部的then回调,相当于返回true
// resolve();
// }).catch(err => {
// // reject()之后,将会进入promise的组件内部的catch回调,相当于返回false
// reject();
// })
})
},
success(file, val) {
var _this=this;
if(file.success&&file.data)
{
// console.log('file',file.data)
// file.data.forEach(item=>{
// if(!_this.fileId.includes(item)){
// _this.fileId.push(item);
// }
// });
// console.log( _this.fileId)
_this.fileId.push(file.data);
// console.log("success");
_this.$emit("picIds", _this.fileId);
}
},
},
}
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,729 @@
<template xlang="wxml">
<view class="tki-tree">
<view
class="tki-tree-mask"
:class="{ show: showTree }"
@tap="_cancel"
></view>
<view class="tki-tree-cnt" :class="{ show: showTree }">
<view class="tki-tree-bar">
<view
class="tki-tree-bar-cancel"
@tap="_cancel"
:style="{ color: cancelColor }"
hover-class="hover-c"
>
取消
</view>
<view v-if="isSearch" class="tki-tree-bar-title">
<u-search
class="searchinput"
v-model="keyword"
:placeholder="placeholder"
@custom="_searchcustom"
@clear="_searchclear"
:clearabled="true"
:show-action="showAction"
@change="searchchange"
shape="square"
bg-color="#EFF4F9"
input-align="left"
></u-search>
</view>
<view v-else class="tki-tree-bar-title" :style="{ color: titleColor }">
{{ title }}
</view>
<view
class="tki-tree-bar-confirm"
:style="{ color: confirmColor }"
hover-class="hover-c"
@tap="_confirm"
>确定</view
>
</view>
<view class="tki-tree-view">
<scroll-view class="tki-tree-view-sc" :scroll-y="true">
<block v-for="(item, index) in treeList" :key="index">
<view
class="tki-tree-item"
:style="[
{
paddingLeft: item.rank * 15 + 'px',
zIndex: item.rank * -1 + 50,
},
]"
:class="{
border: border === true,
show: item.show,
last: item.lastRank,
showchild: item.showChild,
open: item.open,
}"
>
<view
class="tki-tree-label"
@tap.stop="_treeItemTap(item, index)"
>
<image
class="tki-tree-icon"
:src="
item.lastRank
? lastIcon
: item.showChild
? currentIcon
: defaultIcon
"
></image>
{{ item.name }} {{isCount&&!item.lastRank?'('+item.count+')':''}}
</view>
<view
class="tki-tree-check"
@tap.stop="_treeItemSelect(item, index)"
v-if="
((selectParent ? true : item.lastRank) && (isArea ? item.source[lastNotchoose] == 1 : true)) &&((isLevel && selectLevel && (item.rank + 1) >= selectLevel)||!isLevel)
"
>
<view
class="tki-tree-check-yes"
v-if="item.checked"
:class="{ radio: !multiple }"
:style="{ 'border-color': confirmColor }"
>
<view
class="tki-tree-check-yes-b"
:style="{ 'background-color': confirmColor }"
></view>
</view>
<view
class="tki-tree-check-no"
v-else
:class="{ radio: !multiple }"
:style="{ 'border-color': confirmColor }"
></view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "tki-tree",
props: {
range: {
type: Array,
default: function () {
return [];
},
},
idKey: {
type: String,
default: "id",
},
// 用于反显 传字符串格式:'12112121,31313131'
defaultIds: {
// type: String,
default: "",
},
value: {
type: String,
default: "",
},
rangeKey: {
type: String,
default: "label",
},
title: {
type: String,
default: "",
},
multiple: {
// 是否可以多选
type: Boolean,
default: false,
// default: true
},
isArea: {
//是否区域 只有区域可选
type: Boolean,
default: false,
},
selectParent: {
//是否可以选父级
type: Boolean,
default: false,
},
selectThis: {
type: Boolean,
default: false,
},
isLevel: {
// 是否可从第几级别可选
type: Boolean,
default: false,
},
selectLevel: {
// 从第几级可选 根目录是从一级开始赋值1
type: Number,
default: 0, // 从第几级别可选
},
foldAll: {
//折叠时关闭所有已经打开的子集,再次打开时需要一级一级打开
type: Boolean,
default: false,
},
confirmColor: {
// 确定按钮颜色
type: String,
default: "", // #07bb07
},
cancelColor: {
// 取消按钮颜色
type: String,
default: "", // #757575
},
lastNotchoose: {
//判断不同接口最后可选类型
type: String,
default: "", // #757575
},
titleColor: {
// 标题颜色
type: String,
default: "", // #757575
},
currentIcon: {
// 展开时候的ic
type: String,
default: require("@/static/images/arrowx.png"),
},
defaultIcon: {
// 折叠时候的ic
type: String,
default: require("@/static/images/arrowr.png"),
},
lastIcon: {
// 没有子集的ic
type: String,
default: "",
},
border: {
// 是否有分割线
type: Boolean,
default: false,
},
unfold: {
// 是否全部展开
type: Boolean,
default: false,
},
isCount: {
// 是否开启父控件统计模式
type: Boolean,
default: false,
},
isSearch: {
// 是否开启模糊查询
type: Boolean,
default: false,
},
placeholder: {
// 请输入检索关键字
type: String,
default: "请输入检索关键字",
},
searchKey: {
// 筛选关键字键值
type: String,
default: "",
},
},
data() {
return {
showTree: false,
treeListData: [],
treeList: [],
selectIndex: -1,
thisItem: null,
thisIndex: null,
idArr: [],
showAction: false,
keyword: "", //检索关键字
sort:1,
// value :this.localValue
};
},
computed: {},
methods: {
// _handleList(val) {
// this.value =val
// console.log(this.value)
// },
_show() {
this.showTree = true;
},
_hide() {
// this.showTree = false;
// 出发确定事件
this._confirm();
},
_cancel() {
this._hide();
this.$emit("cancel", "");
},
_searchcustom(val) {
// 检索模糊查询事件
if (this.searchKey) {
// 筛选之前先清除选中的数据
this.treeListData.forEach((v, i) => {
this.treeListData[i].checked = false;
});
this.treeList = this.treeListData.filter((p) => {
//filter过滤的意思,这个是过滤函数,将每一项符合结果的值返回到personList
return (
(p.source &&
p.source[this.searchKey] &&
p.source[this.searchKey].indexOf(val) !== -1) ||
(p.source && p.source.children
? this.isfilter(p.source.children, val)
: false)
);
});
}
// this.$emit("searchDo", val);
},
isfilter(arrs, val) {
var rets = false;
arrs.filter((p) => {
//filter过滤的意思,这个是过滤函数,将每一项符合结果的值返回到personList
if (
(p[this.searchKey] && p[this.searchKey].indexOf(val) !== -1) ||
(p.children ? this.isfilter(p.children, val) : false)
) {
rets = true;
}
});
return rets;
},
_searchclear() {
// 检索 清除关键字查询全部事件
this.showAction = false;
var inidata = this.treeListData;
this.treeList = [...inidata];
// this.$emit("searchDo", "");
},
searchchange(value) {
if (value) {
this.showAction = true;
}
},
_confirm() {
// 处理所选数据
let rt = [],
treeList = this.treeList,
obj = {};
if (this.selectThis) {
treeList = this.treeList.slice(0, this.thisIndex + 1);
}
treeList.forEach((v, i) => {
if (treeList[i].checked) {
obj = {};
obj.parents = treeList[i].parents;
console.log(obj.sort)
obj = Object.assign(obj, treeList[i].source);
// 移除子元素
delete obj.children
console.log(obj)
obj.sort = treeList[i].sort;
rt.push(obj);
}
});
// this._hide();
this.showTree = false;
this.$emit("confirm", rt);
},
//扁平化树结构
_renderTreeList(list = [], rank = 0, parentId = [], parents = []) {
list.forEach((item) => {
this.treeList.push({
id: item[this.idKey],
name: item[this.rangeKey],
source: item,
parentId, // 父级id数组
parents, // 父级id数组
rank, // 层级
showChild: this.unfold, //false, //子级是否显示
open: this.unfold, //false, //是否打开
show: rank === 0 || this.unfold, // 自身是否显示
hideArr: [],
orChecked: item.checked ? item.checked : false,
checked: item.checked ? item.checked : false,
count:(((this.selectParent ? true : !item.children) && (this.isArea ? this.lastNotchoose&&item[this.lastNotchoose]&&item[this.lastNotchoose] == 1 : true)) ||
(this.isLevel && this.selectLevel && rank + 1 >= this.selectLevel)?1:0)
});
if (Array.isArray(item.children) && item.children.length > 0) {
let parentid = [...parentId],
parentArr = [...parents],
childrenid = [...childrenid];
delete parentArr.children;
parentid.push(item[this.idKey]);
parentArr.push({
[this.idKey]: item[this.idKey],
[this.rangeKey]: item[this.rangeKey],
});
this._renderTreeList(item.children, rank + 1, parentid, parentArr);
} else {
this.treeList[this.treeList.length - 1].lastRank = true;
}
});
},
// 处理默认选择
_defaultSelect(val) {
if (this.defaultIds) {
let defaultIds = this.defaultIds.split(",") || this.defaultIds;
this.treeList.forEach((item) => {
defaultIds.forEach((i) => {
if (item.id == i) {
item.checked = true;
}
});
});
}
this.treeList.forEach((v, i) => {
if (v.checked) {
this.treeList.forEach((v2, i2) => {
if (v.parentId.toString().indexOf(v2.parentId.toString()) >= 0) {
v2.show = true;
if (v.parentId.includes(v2.id)) {
v2.showChild = true;
v2.open = true;
}
}
});
}
});
},
// 点击
_treeItemTap(item, index) {
this.thisItem = item;
this.thisIndex = index;
console.log(item, index, "点击");
if (item.lastRank === true) {
//点击最后一级时触发事件
if (item.source.isArea == 1) {
this.treeList[index].checked = !this.treeList[index].checked;
this._fixMultiple(index);
return;
}
}
let list = this.treeList;
let id = item.id;
item.showChild = !item.showChild;
item.open = item.showChild ? true : !item.open;
list.forEach((childItem, i) => {
if (item.showChild === false) {
//隐藏所有子级
if (!childItem.parentId.includes(id)) {
return;
}
if (!this.foldAll) {
if (childItem.lastRank !== true && !childItem.open) {
childItem.showChild = false;
}
// 为隐藏的内容添加一个标记
if (childItem.show) {
childItem.hideArr[item.rank] = id;
}
} else {
if (childItem.lastRank !== true) {
childItem.showChild = false;
}
}
childItem.show = false;
} else {
// 打开子集
if (childItem.parentId[childItem.parentId.length - 1] === id) {
childItem.show = true;
}
// 打开被隐藏的子集
if (childItem.parentId.includes(id) && !this.foldAll) {
// console.log(childItem.hideArr)
if (childItem.hideArr[item.rank] === id) {
childItem.show = true;
if (childItem.open && childItem.showChild) {
childItem.showChild = true;
} else {
childItem.showChild = false;
}
childItem.hideArr[item.rank] = null;
}
// console.log(childItem.hideArr)
}
}
});
// console.log(this.treeList)
},
_treeItemSelect(item, index) {
item.sort=this.sort
this.sort++;
this.thisItem = item;
this.thisIndex = index;
this.treeList[index].checked = !this.treeList[index].checked;
this._fixMultiple(index);
if (this.selectParent) {
// 可以选择父级时候,单选某个节点自行判断上下节点都选中,否则默认选中用户点击的
this._chenge(item, this.treeList[index].checked);
}
},
_chenge(e, e1) {
console.log(e)
this.idArr.push(e.id);
if (e.source.children == undefined &&this.multiple) {
this.treeList.forEach((k, i) => {
this.idArr.forEach((k1, i1) => {
if (k.id == k1 && e1 == true) {
this.treeList[i].checked = true;
} else if (k.id == k1 && e1 == false) {
this.treeList[i].checked = false;
}
});
});
if (e.checked) {
e.parentId.forEach((k, i) => {
this.treeList.forEach((k1, i1) => {
if (k1.id == k) {
this.treeList[i1].checked = true;
}
});
});
} else {
e.parentId.forEach((k, i) => {
this.treeList.forEach((k1, i1) => {
if (k1.id == k) {
this.treeList[i1].checked = false;
}
});
});
}
this.treeList.forEach((k1, i1) => {
if (k1.checked ) {
k1.parentId.forEach((k2, i2) => {
this.treeList.forEach((k3, i3) => {
if (k3.id == k2) {
this.treeList[i3].checked = true;
}
});
});
}
});
this.idArr = [];
return;
}
if (!this.selectThis) { //增加判断 选择本级的时候 下级不会被选中
this.handkeCheck1(e.source.children);
}
this.treeList.forEach((k, i) => {
this.idArr.forEach((k1, i1) => {
if (k.id == k1 && e1 == true) {
this.treeList[i].checked = true;
} else if (k.id == k1 && e1 == false) {
this.treeList[i].checked = false;
}
});
});
if(this.multiple){
if ( e.checked) {
e.parentId.forEach((k, i) => {
this.treeList.forEach((k1, i1) => {
if (k1.id == k) {
this.treeList[i1].checked = true;
}
});
});
} else {
e.parentId.forEach((k, i) => {
this.treeList.forEach((k1, i1) => {
if (k1.id == k) {
this.treeList[i1].checked = false;
this.treeList[i1].halfchecked = true;
}
});
});
}
this.treeList.forEach((k1, i1) => {
if (k1.checked) {
k1.parentId.forEach((k2, i2) => {
this.treeList.forEach((k3, i3) => {
if (k3.id == k2) {
this.treeList[i3].checked = true;
}
});
});
}
});
}
this.idArr = [];
},
handkeCheck1(list) {
list.forEach((k, i) => {
this.idArr.push(k.id);
if (k.children == undefined) return;
this.handkeCheck1(k.children);
});
},
handkeCheck(list, e, e1) {
// 点击数据权限
list.forEach((k, i) => {
if (k.children != undefined) {
if (k.id == e.id && e.checked == true) {
k.checked = true;
// console.log(k.id,'第一');
this.handkeChecks(k.children, e, e1);
} else if (k.id == e.id && e.checked == false) {
k.checked = false;
this.handkeChecks(k.children, e, e1);
} else {
this.handkeCheck(k.children, e, e1);
}
} else {
// console.log(1);
if (k.id == e.id && e.checked == true) {
k.checked = true;
} else if (k.id == e.id && e.checked == false) {
k.checked = false;
}
}
});
},
handkeChecks(list, e, e1) {
list.forEach((k, i) => {
if (k.children != undefined) {
if (e.checked) {
k.checked = true;
this.handkeChecks(k.children, e, e1);
} else {
k.checked = false;
this.handkeChecks(k.children, e, e1);
}
} else {
// console.log(k, 'else');
if (e.checked) {
k.checked = true;
} else {
k.checked = false;
}
}
});
},
// 处理单选多选
_fixMultiple(index) {
if (!this.multiple) {
// 如果是单选
this.treeList.forEach((v, i) => {
if (i != index) {
this.treeList[i].checked = false;
} else {
// 多余的,点击一下取消选中 否则一直选中不能取消
// this.treeList[i].checked = true;
// console.log(index,'4444');
}
});
}
},
// 重置数据
_reTreeList() {
this.treeList.forEach((v, i) => {
this.treeList[i].checked = v.orChecked;
});
},
_initTree(range = this.range) {
// console.log('接收值的事件');
this.treeList = [];
this._renderTreeList(range);
// console.log(this.treeList)
this.$nextTick(() => {
this._defaultSelect(range);
if (this.treeList.length > 0) {
this.treeList.map((item, index) => {
// if( this.value.indexOf(item.id)>=0){
if (!this.multiple) {
//如果单选
if (this.value === item.id) {
// 键值相等
this.treeList[index].checked = true;
}
} else {
if (("," + this.value + ",").indexOf("," + item.id + ",") >= 0) {
this.treeList[index].checked = true;
}
}
});
}
});
// 循环统计数字
this.treeList.map((item, index) => {
if(item.parentId&&item.parentId.length>0){
item.parentId.forEach(ii => {
this.treeList.filter((p) => {
if (p.id == ii) {
p.count=p.count+item.count;
}
});
});
}
});
var _this = this;
setTimeout(function () {
var inidata = _this.treeList;
_this.treeListData = [...inidata];
}, 800);
},
_initcount(cell){
}
},
watch: {
defaultIds(value) {
this._initTree();
},
range(list) {
// console.log('监视值的改变1');
this._initTree(list);
},
multiple() {
// console.log('监视值的改变2');
if (this.range.length) {
this._reTreeList();
}
},
selectParent() {
// console.log('监视值的改变3');
if (this.range.length) {
this._reTreeList();
}
},
deep: true, // 深度监听
immediate: true, // 初次监听即执行
},
mounted() {
this._initTree();
},
};
</script>
<style scoped>
@import "./style.css";
</style>

@ -0,0 +1,157 @@
.tki-tree-mask {
position: fixed;
top: 0rpx;
right: 0rpx;
bottom: 0rpx;
left: 0rpx;
z-index: 9998;
background-color: rgba(0, 0, 0, 0.6);
opacity: 0;
transition: all 0.3s ease;
visibility: hidden;
}
.tki-tree-mask.show {
visibility: visible;
opacity: 1;
}
.tki-tree-cnt {
position: fixed;
top: 0rpx;
right: 0rpx;
bottom: 0rpx;
left: 0rpx;
z-index: 9999;
top: 225rpx;
transition: all 0.3s ease;
transform: translateY(100%);
}
.tki-tree-cnt.show {
transform: translateY(0);
}
.tki-tree-bar {
background-color: #fff;
height: 100rpx;
padding-left: 20rpx;
padding-right: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
border-bottom-width: 2rpx !important;
border-bottom-style: solid;
border-bottom-color: #f5f5f5;
font-size: 32rpx;
color: #757575;
line-height: 1;
}
.tki-tree-bar-confirm {
color: #347ACF;
}
.tki-tree-view {
position: absolute;
top: 0rpx;
right: 0rpx;
bottom: 0rpx;
left: 0rpx;
top: 100rpx;
background-color: #fff;
padding-top: 20rpx;
padding-right: 20rpx;
padding-bottom: 20rpx;
padding-left: 20rpx;
}
.tki-tree-view-sc {
height: 100%;
overflow: hidden;
}
.tki-tree-item {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
color: #757575;
line-height: 1;
height: 0;
opacity: 0;
transition: 0.2s;
position: relative;
overflow: hidden;
}
.tki-tree-item.show {
height: 100rpx;
opacity: 1;
}
.tki-tree-item.showchild:before {
transform: rotate(90deg);
}
.tki-tree-item.last:before {
opacity: 0;
}
.tki-tree-icon {
width: 26rpx;
height: 26rpx;
margin-right: 8rpx;
}
.tki-tree-label {
flex: 1;
display: flex;
align-items: center;
height: 100%;
line-height: 1.2;
word-break: break-all;
}
.tki-tree-check {
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
}
.tki-tree-check-yes,
.tki-tree-check-no {
width: 20px;
height: 20px;
border-top-left-radius: 20%;
border-top-right-radius: 20%;
border-bottom-right-radius: 20%;
border-bottom-left-radius: 20%;
border-top-width: 2rpx;
border-left-width: 2rpx;
border-bottom-width: 2rpx;
border-right-width: 2rpx;
border-style: solid;
border-color: #347ACF;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
.tki-tree-check-yes-b {
width: 12px;
height: 12px;
border-top-left-radius: 20%;
border-top-right-radius: 20%;
border-bottom-right-radius: 20%;
border-bottom-left-radius: 20%;
background-color: #347ACF;
}
.tki-tree-check .radio {
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-right-radius: 50%;
border-bottom-left-radius: 50%;
}
.tki-tree-check .radio .tki-tree-check-yes-b {
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-right-radius: 50%;
border-bottom-left-radius: 50%;
}
.hover-c {
opacity: 0.6;
}
.tki-tree-bar-title{
color:#000000;
width: 66%;
text-align: center;
}

@ -0,0 +1,426 @@
<template>
<view>
<view v-for="(i,ind) in relatedContents" :key='ind'>
<view v-if="(ind==0 && i.sort) || (ind>0 && i.sort && i.sort!=relatedContents[ind-1].sort)" style="width: 100%; font-size: 28rpx;font-weight: 600;color:#000; margin-left: 20rpx;">
<view style="margin:24rpx 0 12rpx 0">
<image v-if="i.isTmpFlag=='1'" :src="zdy" class="radius" style="margin-right: 8rpx;"></image>
{{i.sort}}
</view>
</view>
<view class="checkproduct finish" >
<view class="u-flex u-col-top u-row-between">
<view class="u-flex u-row-between">
<view v-if="!editContent" class="noticeBar" style="margin-right: 20rpx;" >{{i.content||i.checkContent}}</view>
<u-input v-else v-model="i.content" type="text" class="noticeBar contentInp" placeholder="请输入检查内容" height="30" />
</view>
<view>
<image v-if="editContent" :src="del" @click="delContent(ind)" class="delIcon"></image>
<!-- <u-tag v-if="checkResult" class="tit" :text='i.checkResult==0?"无隐患":"有隐患"' border-color="#fff"
:type="i.checkResult==0?'success':'error'" /> -->
</view>
</view>
<view class="u-flex u-row-between star">
<view v-if="!checkResult">
<u-radio-group v-model="i.checkResult" @change="changeRadio($event,ind)">
<u-radio size="mini" v-for="(item, index) in checkList" :key="index" :name="item.value">
{{item.name}}
</u-radio>
</u-radio-group>
</view>
<view v-else style="width: 200rpx;">
<view :class="i.checkResult==0?'dangerno':'dangeryes'">
<image v-if="i.checkResult==0" class="radius" :src="radius" width="32rpx" height="32rpx"></image>
<image v-else class="radius" :src="radiusyes" width="38rpx" height="38rpx"></image>
<span style="margin-left: 8rpx; margin-bottom: 8rpx;">{{i.checkResult==0?"无隐患":"有隐患"}}</span>
</view>
</view>
<view style="width: 100%; text-align: right;">
<u-button v-if="i.regionIds" size="mini" class="colorBtn" style="margin-right: 20rpx;" shape="square"
@click="lookRegion(i.regionIds,ind)">所在区域
</u-button>
<u-button size="mini" :class="(i.problemDesc||i.checkResult=='1')?'colorBtnRed':''" shape="square"
@click="(i.problemDesc||i.checkResult==1)&&problem(i.problemDesc,ind)">问题描述
</u-button>
<u-button size="mini" :class="(i.photoIds.length>0||!checkResult)?'colorBtn':''" style="margin-left: 20rpx;" shape="square"
@click="(i.photoIds.length>0||!checkResult)&&lookphoto(i.photoIds,ind)">现场照片
</u-button>
</view>
<u-modal v-model="showModal" content="是否删除该检查项" show-cancel-button @confirm='modalDel'
@cancel="showModal=false"></u-modal>
</view>
</view>
</view>
<u-popup v-model="show" z-index="1000" mode="bottom" border-radius="8" height="300rpx">
<view class="popup">
<view v-if="checkResult&&relatedContents[itemIndex]" >
<u-image class="checkimg" width="200rpx" height="200rpx" v-for="(item,index) in relatedContents[itemIndex].photoList" :key="index" @tap="ViewImage1(item,index)" :data-url="index"
:src="imgurl+`/portal/file/onlinePreviewController/v1/getFileById_${item.id}`"></u-image>
</view>
<UploadFile v-else @picIds="picIds" :fileidList='fileidList'></UploadFile>
</view>
</u-popup>
<u-popup v-model="showRemark" z-index="1000" mode="bottom" border-radius="8" height="200rpx">
<view class="popup">
<u-input v-if="editContent" type="textarea" :value="problemDesc" @blur='blur' maxlength='30' placeholder="请填写问题描述" />
<view style="margin-right: 20rpx;line-height: 36rpx;">{{problemDesc}}</view>
</view>
</u-popup>
<u-popup v-model="showRegion" style="z-index: 10000;" @close="close" @open="open" mode="bottom">
<view class="popcon">
<view class="popbtn" @tap="close">
<u-icon name="close" size="36" color="#909399"></u-icon>
</view>
<view class="poptitle">
所在区域
</view>
<view class="popcell" v-if="regionListNames">
<view class="rlist" v-for="(res, index) in regionListNames" :key="index">
<view class="rhead">
{{res.name}}
</view>
<view class="rcon">
<view class="rcell" v-for="(text, ii) in res.texts" :key="ii">
{{text}}
</view>
</view>
</view>
</view>
</view>
</u-popup>
<u-toast ref="uToast" />
<u-button type="primary" v-if="!checkResult" class="submit" @click="submitTask" shape="circle">提 交</u-button>
<view style="height:40rpx ;"></view>
</view>
</template>
<script>
import UploadFile from "@/components/UploadFile.vue"
export default {
name: "myCheck",
components: {
UploadFile
},
props: ['list', 'editContent', 'checkResult'],
data() {
return {
del: require("@/static/images/del.png"),
zdy: require("@/static/images/zdy.png"),
radius: require("@/static/images/radius.png"),
radiusyes: require("@/static/images/radiusred.png"),
imgurl:'',
fileidList: [],
showRemark: false,
showModal: false,
showRegion: false,
content: {},
relatedContents: [],
show: false,
showColor:false,
desc:false,
problemDesc: '',
delIndex: null,
picidlist: [],
problemIndex: null,
checkList: [{
name: "无隐患",
value: "0"
}, {
name: "有隐患",
value: "1"
}],
itemIndex: 0,
regionListNames:[]
}
},
watch: {
list(val) {
this.relatedContents = val.map(function(item) {
if (item.photoIds&&Array.isArray(item.photoIds)) {
item.photoIds = item.photoIds
} else if (item.photoIds&&typeof(item.photoIds) == 'string') {
item.photoIds = item.photoIds.split(',')
} else {
item.photoIds = []
}
item.checkResult=item.checkResult?item.checkResult:"0"
return item;
})
}
},
mounted() {
this.imgurl=this.$u.api.imgurl;
},
methods: {
lookphoto(val, index) {
this.show = true;
this.itemIndex = index
if (this.relatedContents[this.itemIndex].photoIds.length > 0) {
this.fileidList = this.relatedContents[this.itemIndex].photoIds
}else{
this.fileidList =[]
}
},
picIds(val, i) {
this.relatedContents[this.itemIndex].photoIds = val;
},
submitTask() {
let isok = this.relatedContents.every(item => {
item.checkResult = !item.checkResult ? '0' : item.checkResult
return (item.checkResult == 1 && item.problemDesc) || (item.checkResult == 0)
})
if (!isok) {
this.$refs.uToast.show({
title: '有隐患时请填写问题描述',
type: 'error',
})
} else {
this.$emit('submitData', this.relatedContents)
}
},
delContent(index) {
this.delIndex = index
this.showModal = true
},
changeRadio(val,ind){
this.$forceUpdate()
},
ViewImage1(val,index) {
var imgList=[];
this.relatedContents[this.itemIndex].photoList.forEach((item,index)=>{
imgList.push(this.imgurl+`/portal/file/onlinePreviewController/v1/getFileById_${item.id}`);
})
uni.previewImage({
urls: imgList,
current:index
});
},
problem(val, index) {
this.showRemark = true
this.problemIndex = index
this.problemDesc = val
},
lookRegion(val,index) {
if(!this.relatedContents[index].regionListName){
this.relatedContents[index].regionListName=[];
// 获取区域数据
uni.showLoading();
var param={
regionIds:val
}
this.$u.api.queryregionNameById(param).then(res => {
uni.hideLoading();
console.log(res)
if(res&&res.length>0){
var regionListName=res;
regionListName.forEach((cell) => {
var ii= Object.keys(cell)[0];
var item={
name: ii,
texts:cell[ii]?(cell[ii]).split(','):[]
};
this.relatedContents[index].regionListName.push(item);
});
console.log(this.relatedContents[index].regionListName)
this.regionListNames=this.relatedContents[index].regionListName;
this.showRegion = true;
}
})
}
else{
this.regionListNames=this.relatedContents[index].regionListName;
this.showRegion = true;
}
},
modalDel() {
this.relatedContents.splice(this.delIndex, 1)
this.$emit('contentData', this.relatedContents)
},
blur(val) {
this.relatedContents[this.problemIndex].problemDesc = val;
},
close() {
// console.log('close');
this.showRegion=false;
},
open() {
// console.log('open');
},
}
}
</script>
<style lang="scss" scoped>
::v-deep img{
opacity: 1
}
.radius{
width: 28rpx;
height: 28rpx;
}
.u-drawer{
height: auto !important;
}
.checkimg{
margin-right: 20rpx;
display: inline-block;
}
.tit{
width: 120rpx;
margin-top: -12rpx;
}
.checkproduct {
width: 710rpx;
padding: 24rpx;
margin-left: 20rpx;
background: #fff;
// height: 80rpx;
border-radius: 8rpx;
margin-bottom: 20rpx;
overflow: hidden;
image {
width: 28rpx;
height: 28rpx;
// top: -6rpx;
}
.noticeBar {
// width: 450rpx;
// margin-top: 20rpx;
margin-bottom: 8rpx;
font-size: 28rpx;
color:#000;
}
.delIcon {
float: right;
}
.dangerno{
height: 60rpx;
width: 150rpx;
background: url('../static/images/nobg.png') no-repeat center center;
background-size: 100% auto;
font-size: 24rpx;
color:#347ACF;
padding: 12rpx;
}
.dangeryes{
height: 60rpx;
width: 150rpx;
background: url('../static/images/hasbg.png') no-repeat center center;
background-size: 100% auto;
font-size: 24rpx;
color:#fa3534;
padding: 12rpx;
}
}
.contentInp {
margin-left: 20rpx;
z-index: 9;
// display: inline-block;
// width: 300rpx;
}
.finish {
// height: 180rpx;
.buttonList {
margin-left: 360rpx;
margin-top: 40rpx;
}
}
.popup {
margin-left: 46rpx;
margin-top: 40rpx;
}
.star {
position: relative;
top: 10rpx;
// height: 166rpx;
}
.colorBtn {
color: #347ACF;
border-color: #347ACF;
}
.colorBtnRed {
color: #fa3534;
border-color: #fa3534;
}
.submit {
width: 710rpx;
margin: 20rpx
}
.popcon{
position: relative;
display: block;
overflow: hidden;
width: 100%;
.popbtn{
position: absolute;
right:20rpx;
top:26rpx;
font-size: 28rpx;
}
.poptitle
{
color:#33383C;
font-size: 30upx;
margin: 26rpx;
text-align: left;
}
.popcell{
padding: 20rpx;
.rlist{
position: relative;
display: block;
overflow: hidden;
width: 100%;
.rhead{
width: 100%;
height: 66rpx;
line-height: 66rpx;
text-align: center;
background: url('../static/images/areabg.jpg') no-repeat center center;
background-size: 100% auto;
font-size: 28rpx;
font-weight: 600;
color:#fff;
border-radius: 10rpx 10rpx 0 0;
}
.rcon{
width: 100%;
background-color: #f8fafc;
padding-bottom: 20rpx;
.rcell{
display:inline-block;
font-size:26rpx;
color:#000;
background:#fff;
padding:10rpx 28rpx;
height:60rpx;
border-radius:30rpx;
border:1rpx solid #d8dde6;
margin-left:16rpx;
margin-right:3rpx;
margin-top:18rpx;
box-shadow: 0 9rpx 19rpx 0 #DCDFE6, 0 0 17rpx 0 #DCDFE6;
}
}
}
}
}
</style>

@ -0,0 +1,183 @@
<template>
<view class="noTabBarPage">
<view class="search">
<u-search placeholder="搜索" v-model="keyword" shape="square" :animation="true" @custom="search" ></u-search>
</view>
<view>
<u-tabs :list="list" bar-width="90" :is-scroll="false" :current="current" @change="change">
</u-tabs>
<view class="content">
<view style="margin-bottom: 20rpx;font-weight: bold;" v-if="current==0">未完成的检查({{total}})</view>
<view style="margin-bottom: 20rpx;font-weight: bold;" v-else>已完成的检查({{total}})</view>
<view v-if="total>0">
<view class="taskCard " v-for="item in listData">
<view @click="pushdetail(item.id,current)">
<view class="u-flex u-col-top u-row-between font_bold"><span>{{item.name}}</span>
<u-tag v-if="current==1" :text='item.checkResult==0?"无隐患":"有隐患"' border-color="#fff"
:type="item.checkResult==0?'success':'error'" />
<u-tag v-else :text='item.checkStatus==0?"计划中":"已超期"' border-color="#fff"
:type="item.checkStatus==0?'primary':'warning'" />
</view>
<view class="cardcontant">
<image :src="taskIcon" class="taskIcon"></image>
<view class="rightContant">
<view>检查类别:{{item.checkTypeName}}</view>
<view v-if="current==0">计划检查时间:<span :class="current==0&&item.checkStatus==4?'red':''">{{item.checkTime}}</span></view>
<view v-else>实际检查时间:<span :class="current==0&&item.checkStatus==4?'red':''">{{item.realCheckTime}}</span></view>
<view>检查人员:{{item.relatedUsers}}</view>
</view>
</view>
</view>
<image :src="check" v-if="current==0" @click="pushdetail(item.id,3)" class="check"></image>
</view>
</view>
<view v-else>
</view>
</view>
</view>
<u-loadmore :status="status" v-if="total>=9"/>
</view>
</template>
<script>
export default {
name: "myCheck",
data() {
return {
comeback: require("@/static/images/arrow-right.png"),
taskIcon: require("@/static/images/taskIcon.png"),
check: require("@/static/images/check.png"),
menuList: [],
status: '',
show: false,
list: [{
name: '未完成'
}, {
name: '已完成'
}],
keyword: "",
listData: [],
tasks:null,
total: 0,
page: {
current: 1,
size: 10,
checkState: "0,4"
},
current: 0
}
},
props:['type'],
onReachBottom() {
this.status = 'loading';
this.page.current = ++ this.page.current;
this.myTasks()
},
methods: {
change(index) {
this.listData=[]
this.current = index;
this.page.current =1
this.page.checkState = index == 0 ? "0,4" : "1,2"
this.myTasks()
},
myTasks() {
if(this._props.type==1){
this.$u.api.myTasks(this.page).then(res => {
this.total = res.total
this.listData.push(...res.rows)
if (res.rows.length < 10) {
this.status = 'nomore'
}
})
}else{
this.$u.api.tasksPlan({},this.page).then(res => {
this.total = res.total
this.listData.push(...res.rows)
if (res.rows.length < 10) {
this.status = 'nomore'
}
})
}
},
search(val){
this.page.current=1
this.listData=[]
this.page.keyword=val
this.myTasks()
},
pushdetail(val,type){
uni.navigateTo({
url: `/packageD/pages/dualMechanism/securityManage/checkDetail?id=${val}&type=${type}`
});
}
},
mounted() {
this.myTasks()
}
}
</script>
<style lang="scss" scoped>
.red{
color:red
}
.search {
width: 100%;
height: 88rpx;
background: #fff;
padding: 12rpx 20rpx;
}
.content {
padding: 20rpx;
.taskCard {
width: 710rpx;
height: 240rpx;
background: #fff;
border-radius: 8rpx;
padding: 30rpx;
position: relative;
font-size: 28rpx;
margin-bottom: 20rpx;
.check {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 140rpx;
right: 35rpx;
}
.cardcontant {
.taskIcon {
width: 162rpx;
height: 128rpx;
}
.rightContant {
font-size: 22rpx;
width: 300rpx;
margin-left: 20rpx;
position: absolute;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
view {
margin-bottom: 10rpx;
}
}
}
}
}
</style>

@ -0,0 +1,280 @@
<template>
<view class="noTabBarPage">
<view class="search">
<u-search placeholder="搜索" v-model="keyword" shape="square" @custom="search" :animation="true"></u-search>
</view>
<view class="areas">
<!-- <view class="searchBlock" @click="choose('',0)" :class="currentKey==0?'chooseCss':'unchooseCss'">
<image class="searchIcon" :src="currentKey==0?all:all1"></image>
<view class="rightIcon">
<view style="font-size:32rpx">{{total}}</view>
<view style="opacity: 0.7;">全部巡检点</view>
</view>
</view> -->
<view class="searchBlock" @click="choose(2)" :class="currentKey==2?'chooseCss':'unchooseCss'">
<image class="searchIcon" :src="currentKey==2?all:all1"></image>
<view class="rightIcon">
<view style="font-size:32rpx">{{total}}</view>
<view style="opacity: 0.7;">全部</view>
</view>
</view>
<view class="searchBlock" @click="choose(1)" :class="currentKey==1?'chooseCss':'unchooseCss'">
<image class="searchIcon" :src="currentKey==1?dangerS:dangerS1"></image>
<view class="rightIcon">
<view style="font-size:32rpx">{{total1}}</view>
<view style="opacity: 0.7;">有隐患</view>
</view>
</view>
<view class="searchBlock" @click="choose(0)" :class="currentKey==0?'chooseCss':'unchooseCss'">
<image class="searchIcon" :src="currentKey==0?dangerP:dangerP1"></image>
<view class="rightIcon">
<view style="font-size:32rpx">{{total0}}</view>
<view style="opacity: 0.7;">无隐患</view>
</view>
</view>
<!-- <view class="searchBlock" @click="choose(item.type,+index+1)"
:class="+index+1==currentKey?'chooseCss':'unchooseCss'" v-for="(item,index) in screening">
<image class="searchIcon" :src="index+1==currentKey?all:all1"></image>
<view class="rightIcon">
<view style="font-size:32rpx">{{item.count}}</view>
<view style="opacity: 0.7;">{{item.typeName}}</view>
</view>
</view> -->
</view>
<view>
<view class="content">
<view v-if="total>0">
<view class="taskCard " v-for="item in listData">
<view @click="pushdetail(item.id,current)">
<view class="u-flex u-col-top u-row-between"><span>{{item.name}}</span>
<u-tag :text='item.checkResult==0?"无隐患":"有隐患"' border-color="#fff"
:type="item.checkResult==0?'success':'error'" />
</view>
<view class="cardcontant">
<image :src="taskIcon" class="taskIcon"></image>
<view class="rightContant">
<view>检查类别:{{item.checkTypeName}}</view>
<view>检查时间:<span
:class="current==0&&item.checkStatus==4?'red':''">{{item.realCheckTime.slice(0, 10)}}</span>
</view>
<view>检查人员:{{item.relatedUsers}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore :status="status" v-if="total>=9" />
</view>
</template>
<script>
export default {
name: "checkList",
components: {},
props:['type'],
data() {
return {
comeback: require("@/static/images/arrow-right.png"),
all: require("@/static/images/all.png"),
all1: require("@/static/images/qb.png"),
dangerS: require("@/static/images/dangerS.png"),
dangerS1: require("@/static/images/wxy.png"),
dangerP: require("@/static/images/wxd.png"),
dangerP1: require("@/static/images/wxd.png"),
taskIcon: require("@/static/images/taskIcon.png"),
menuList: [],
name: "",
currentKey: 2,
show: false,
screening: [],
status: 'loadmore',
total1: 0,
total0: 0,
keyword: "",
listData: [],
total: 0,
page: {
current: 1,
size: 10,
},
current: 1
}
},
// onReachBottom() {
// debugger
// this.status = 'loading';
// this.page.current = ++this.page.current;
// this.queryListByType(2)
// },
methods: {
onBottom() {
console.log(11)
this.status = 'loading';
this.page.current = ++this.page.current;
this.queryListByType(2)
},
queryListByType(val, type) {
if (val == 2) {
delete this.page.checkResult;
} else {
this.page.checkResult = val
}
//1是临时检查 2是检查记录
if(this._props.type==1){
this.page.checkMode =2
}else{
this.page.checkState= '1,2'
}
this.$u.api.queryListByType(this.page).then(res => {
this.listData.push(...res.rows)
if (res.rows.length < 10) {
this.status = 'nomore'
}
if (!type) {
this.total += res.rows.length
res.rows.length > 0 && res.rows.map(item => {
item.checkResult == 0 ? this.total0++ : this.total1++
})
}
})
},
search(val) {
this.page.current = 1
this.listData = []
this.total1 = 0
this.total0 = 0
this.total = 0
this.page.keyword = val
this.queryListByType(this.currentKey)
},
choose(index) {
this.page.current = 1
this.listData = []
this.queryListByType(index, 'choose')
this.currentKey = index;
},
pushdetail(val, type) {
uni.navigateTo({
url: `/packageD/pages/dualMechanism/securityManage/checkDetail?id=${val}&type=${type}`
});
}
},
mounted() {
// var queryData="queryType=2";
this.$u.api.queryHeadType({},queryType:2).then(res => {
this.screening = res
})
this.queryListByType(2)
}
}
</script>
<style lang="scss" scoped>
::v-deep .u-load-more-inner {
margin-bottom: 20rpx;
}
.red {
color: red
}
.search {
width: 100%;
height: 88rpx;
background: #fff;
padding: 12rpx 20rpx;
}
.chooseCss {
background-color: #347ACF;
color: #fff;
}
.unchooseCss {
background-color: #fff;
}
.searchBlock {
width: 225rpx;
height: 112rpx;
border-radius: 8rpx;
display: inline-block;
padding: 24rpx 10rpx;
margin-right: 20rpx;
margin-top: 20rpx;
.searchIcon {
width: 60rpx;
height: 60rpx;
}
.rightIcon {
margin-top: -75rpx;
margin-left: 70rpx;
font-size: 22rpx;
}
}
.areas {
padding: 20rpx 0 20rpx 20rpx;
width: 750rpx;
height: 176rpx;
white-space: nowrap;
overflow: hidden;
}
.content {
padding: 20rpx;
.taskCard {
width: 710rpx;
height: 240rpx;
background: #fff;
border-radius: 8rpx;
padding: 30rpx;
position: relative;
font-size: 28rpx;
margin-bottom: 20rpx;
.check {
width: 64rpx;
height: 64rpx;
position: absolute;
top: 140rpx;
right: 35rpx;
}
.cardcontant {
.taskIcon {
width: 162rpx;
height: 128rpx;
}
.rightContant {
font-size: 22rpx;
width: 300rpx;
margin-top: 10rpx;
margin-left: 20rpx;
position: absolute;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
view {
margin-bottom: 10rpx;
}
}
}
}
}
</style>

@ -0,0 +1,840 @@
<template>
<view class="container">
<!-- 主内容区域 -->
<scroll-view class="content" scroll-y="true">
<!-- 配送单详情 -->
<view v-if="!ifother" class="section">
<view class="section-header">
<text class="section-title">配送单详情</text>
</view>
<view class="info-card" v-if="pallet">
<view class="info-row">
<text class="label">工装托盘编号:</text>
<text class="value">{{pallet.palletNo || '-' }}</text>
</view>
<!-- <view class="info-row">
<text class="label">外形尺寸:</text>
<text class="value">{{pallet.size || '-' }}</text>
</view>
<view class="info-row">
<text class="label">载重:</text>
<text class="value">{{pallet.load || '-' }}</text>
</view>
<view class="info-row">
<text class="label">使用状态:</text>
<text class="value status-used">{{ retType(pallet.palletStatus,3) || '-' }}</text>
</view>
<view class="info-row">
<text class="label">创建日期:</text>
<text class="value">{{pallet.createDate || '-' }}</text>
</view>
<view class="info-row">
<text class="label">备注:</text>
<text class="value">{{pallet.remark || '-' }}</text>
</view> -->
<view class="info-row">
<text class="label">转运状态:</text>
<text class="value status-transit">{{ retType(pallet.status,1)|| '-' }}</text>
</view>
<!-- <view class="info-row">
<text class="label">当前转运状态:</text>
<text class="value">{{pallet.deliveryId || '-' }}</text>
</view> -->
<view class="info-row">
<text class="label">存放部门:</text>
<text class="value">{{ retType(pallet.departCode,2) || '-' }}</text>
</view>
<view class="info-row">
<text class="label">存放工场:</text>
<text class="value">{{pallet.workshop || '-' }}</text>
</view>
<view class="info-row">
<text class="label">存放区域:</text>
<text class="value">{{pallet.location || '-' }}</text>
</view>
<view class="info-row">
<text class="label">存放地址:</text>
<text class="value">{{pallet.address || '-' }}</text>
</view>
<!-- <view class="info-row">
<text class="label">接收/回收确认时间:</text>
<text class="value">{{pallet.confirmTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收/回收人确认电话:</text>
<text class="value">{{pallet.confirmPhone || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收/回收人确认备注:</text>
<text class="value">{{pallet.confirmRemark || '-' }}</text>
</view> -->
<view class="info-row">
<text class="label">装盘船只:</text>
<text class="value">{{pallet.loadProject || '-' }}</text>
</view>
<view class="info-row">
<text class="label">装盘安装托盘表号:</text>
<text class="value">{{pallet.loadInst || '-' }}</text>
</view>
<view class="info-row">
<text class="label">装盘数量:</text>
<text class="value">{{pallet.loadQty || '-' }}</text>
</view>
<view class="info-row">
<text class="label">装盘信息:</text>
<text class="value">{{pallet.loadDesc || '-' }}</text>
</view>
<view class="info-row" v-if="pallet.status=='03'||pallet.status=='04'">
<text class="label">去向部门:</text>
<text class="value">{{ retType(pallet.toDepartCode,2) || '-' }}</text>
</view>
<view class="info-row" v-if="pallet.status=='03'||pallet.status=='04'">
<text class="label">去向工场:</text>
<text class="value">{{pallet.toWorkshop || '-' }}</text>
</view>
<view class="info-row" v-if="pallet.status=='03'||pallet.status=='04'">
<text class="label">去向位置:</text>
<text class="value">{{pallet.toLocation || '-' }}</text>
</view>
<view class="info-row" v-if="pallet.status=='03'||pallet.status=='04'">
<text class="label">去向地址:</text>
<text class="value">{{pallet.toAddress || '-' }}</text>
</view>
<!-- <view class="info-row">
<text class="label">装盘时间:</text>
<text class="value">{{pallet.loadTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">装盘人:</text>
<text class="value">{{pallet.loadName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送单号:</text>
<text class="value">{{pallet.deliveryNo || '-' }}</text>
</view>
<view class="info-row">
<text class="label">车辆牌号:</text>
<text class="value">{{pallet.deliveryCar || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运部门:</text>
<text class="value">{{ retType(pallet.fromDepartCode,2)|| '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运工场:</text>
<text class="value">{{pallet.fromWorkshop || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运区域:</text>
<text class="value">{{pallet.fromLocation || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运地址:</text>
<text class="value">{{pallet.fromAddress || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运时间:</text>
<text class="value">{{pallet.fromTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运人员:</text>
<text class="value">{{pallet.fromName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运人员电话:</text>
<text class="value">{{pallet.fromPhone || '-' }}</text>
</view> -->
<!-- <view class="info-row">
<text class="label">配送/转运备注:</text>
<text class="value">{{pallet.fromRemark || '-' }}</text>
</view>
<view class="info-row">
<text class="label">去向接收人员:</text>
<text class="value">{{pallet.toName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">去向接收人员电话:</text>
<text class="value">{{pallet.toPhone || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收部门:</text>
<text class="value">{{ retType(pallet.receiveDepartCode,2) || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收工场:</text>
<text class="value">{{pallet.receiveWorkshop || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收区域:</text>
<text class="value">{{pallet.receiveLocation || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收地址:</text>
<text class="value">{{pallet.receiveAddress || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收时间:</text>
<text class="value">{{pallet.receiveTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收人员:</text>
<text class="value">{{pallet.receiveName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收人员电话:</text>
<text class="value">{{pallet.receivePhone || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收备注:</text>
<text class="value">{{pallet.receiveRemark || '-' }}</text>
</view>
<view class="info-row">
<text class="label">卸盘时间:</text>
<text class="value">{{pallet.finishTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">卸盘人员:</text>
<text class="value">{{pallet.finishName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">卸盘人员电话:</text>
<text class="value">{{pallet.finishPhone || '-' }}</text>
</view>
<view class="info-row">
<text class="label">卸盘备注:</text>
<text class="value">{{pallet.finishRemark || '-' }}</text>
</view> -->
</view>
</view>
<!-- 装盘明细 -->
<view v-if="!ifother" class="section">
<view class="section-header">
<text class="section-title">装盘明细({{pallet&&pallet.instdetailList?pallet.instdetailList.length:0}})</text>
</view>
<view class="list-container" v-if="pallet&&pallet.instdetailList">
<view v-for="(item, index) in pallet.instdetailList" :key="index" class="list-item">
<view class="item-header" @click="toggleDetail(index)">
<text class="item-title">{{ item.assemcode }}</text>
<text class="status-badge" :class="getStatusClass(item.status)">{{item.status}}</text>
<uni-icons :type="expandedIndex === index ? 'arrowup' : 'arrowdown'" size="16" color="#999"></uni-icons>
</view>
<view v-if="expandedIndex === index" class="item-content">
<view class="detail-row">
<text class="label">工程编号:</text>
<text class="value">{{ item.project }}</text>
</view>
<view class="detail-row">
<text class="label">安装托盘表号:</text>
<text class="value">{{ item.instno }}</text>
</view>
<view class="detail-row">
<text class="label">制作图号:</text>
<text class="value">{{ item.dwgno }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">分段号:</text>
<text class="value">{{ item.section }}</text>
</view> -->
<view class="detail-row">
<text class="label">规格:</text>
<text class="value">{{ item.spec }}</text>
</view>
<view class="detail-row">
<text class="label">材质:</text>
<text class="value">{{ item.grd }}</text>
</view>
<view class="detail-row">
<text class="label">数量:</text>
<text class="value">{{ item.qty }}</text>
</view>
<view class="detail-row">
<text class="label">重量:</text>
<text class="value">{{ item.weight }}</text>
</view>
<view class="detail-row">
<text class="label">表面处理:</text>
<text class="value">{{ item.treatment }}</text>
</view>
<view class="detail-row">
<text class="label">涂装代码:</text>
<text class="value">{{ item.paintcode }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">状态日期:</text>
<text class="value">{{ item.statusDate }}</text>
</view> -->
<view class="detail-row">
<text class="label">制作单位:</text>
<text class="value">{{ item.manuDept }}</text>
</view>
<view class="detail-row">
<text class="label">处理单位:</text>
<text class="value">{{ item.treatDept }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">配送单位:</text>
<text class="value">{{ item.deliverDept }}</text>
</view> -->
<view class="detail-row">
<text class="label">工装托盘编号:</text>
<text class="value">{{ item.palletNo }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">工装托盘转运记录ID:</text>
<text class="value">{{ item.deliveryId }}</text>
</view> -->
<!-- <view class="detail-row">
<text class="label">配送单号:</text>
<text class="value">{{ item.deliveryNo }}</text>
</view> -->
<view class="detail-row">
<text class="label">配送车辆:</text>
<text class="value">{{ item.deliveryCar }}</text>
</view>
<view class="detail-row">
<text class="label">配送日期:</text>
<text class="value">{{ item.deliveryDate }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">配送备注:</text>
<text class="value">{{ item.deliveryRemark }}</text>
</view>
<view class="detail-row">
<text class="label">需求日期:</text>
<text class="value">{{ item.requireRate }}</text>
</view> -->
<view class="detail-row">
<text class="label">需求单位:</text>
<text class="value">{{ retType(item.requireDepartCode,2) }}</text>
</view>
<view class="detail-row">
<text class="label">配送地址:</text>
<text class="value">{{ item.requireAddress }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员:</text>
<text class="value">{{ item.requireName }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员电话:</text>
<text class="value">{{ item.requirePhone }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">实际接收日期:</text>
<text class="value">{{ item.receiveDate }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收人员:</text>
<text class="value">{{ item.receiveName }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收备注:</text>
<text class="value">{{ item.receiveRemark }}</text>
</view> -->
</view>
</view>
</view>
</view>
<!-- 配送操作图片 -->
<view v-if="!ifother" class="section">
<view class="section-header">
<text class="section-title">配送操作图片</text>
</view>
<view class="image-grid" v-if="pallet&&pallet.files">
<view class="image-item" v-for="(img, index) in pallet.files" :key="index">
<image :src="img" mode="aspectFill" @click="prviewImage(index)" class="image"></image>
</view>
</view>
</view>
<!-- 零散物资信息 -->
<view v-if="ifother" class="section">
<view class="section-header">
<text class="section-title">零散物资信息</text>
</view>
<!-- 零散物资信息列表 -->
<view class="list-container" v-if="other.length>0">
<view v-for="(item, index) in other" :key="index" class="list-item">
<view class="item-header" @click="toggleDetail1(index)">
<text class="item-title">{{ item.assemcode }}</text>
<text class="status-badge" :class="getStatusClass(item.status)">{{item.status}}</text>
<uni-icons :type="expandedIndex1 === index ? 'arrowup' : 'arrowdown'" size="16" color="#999"></uni-icons>
</view>
<view v-if="expandedIndex1 === index" class="item-content">
<view class="detail-row">
<text class="label">工程编号:</text>
<text class="value">{{ item.project }}</text>
</view>
<view class="detail-row">
<text class="label">安装托盘表号:</text>
<text class="value">{{ item.instno }}</text>
</view>
<view class="detail-row">
<text class="label">制作图号:</text>
<text class="value">{{ item.dwgno }}</text>
</view>
<view class="detail-row">
<text class="label">分段号:</text>
<text class="value">{{ item.section }}</text>
</view>
<view class="detail-row">
<text class="label">规格:</text>
<text class="value">{{ item.spec }}</text>
</view>
<view class="detail-row">
<text class="label">材质:</text>
<text class="value">{{ item.grd }}</text>
</view>
<view class="detail-row">
<text class="label">数量:</text>
<text class="value">{{ item.qty }}</text>
</view>
<view class="detail-row">
<text class="label">重量:</text>
<text class="value">{{ item.weight }}</text>
</view>
<view class="detail-row">
<text class="label">表面处理:</text>
<text class="value">{{ item.treatment }}</text>
</view>
<view class="detail-row">
<text class="label">涂装代码:</text>
<text class="value">{{ item.paintcode }}</text>
</view>
<view class="detail-row">
<text class="label">状态日期:</text>
<text class="value">{{ item.statusDate }}</text>
</view>
<view class="detail-row">
<text class="label">制作单位:</text>
<text class="value">{{ item.manuDept }}</text>
</view>
<view class="detail-row">
<text class="label">处理单位:</text>
<text class="value">{{ item.treatDept }}</text>
</view>
<view class="detail-row">
<text class="label">配送单位:</text>
<text class="value">{{ item.deliverDept }}</text>
</view>
<view class="detail-row">
<text class="label">工装托盘编号:</text>
<text class="value">{{ item.palletNo }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">工装托盘转运记录ID:</text>
<text class="value">{{ item.deliveryId }}</text>
</view> -->
<view class="detail-row">
<text class="label">配送单号:</text>
<text class="value">{{ item.deliveryNo }}</text>
</view>
<view class="detail-row">
<text class="label">配送车辆:</text>
<text class="value">{{ item.deliveryCar }}</text>
</view>
<view class="detail-row">
<text class="label">配送日期:</text>
<text class="value">{{ item.deliveryDate }}</text>
</view>
<view class="detail-row">
<text class="label">配送备注:</text>
<text class="value">{{ item.deliveryRemark }}</text>
</view>
<view class="detail-row">
<text class="label">需求日期:</text>
<text class="value">{{ item.requireRate }}</text>
</view>
<view class="detail-row">
<text class="label">需求单位:</text>
<text class="value">{{ retType(item.requireDepartCode,2) }}</text>
</view>
<view class="detail-row">
<text class="label">配送地址:</text>
<text class="value">{{ item.requireAddress }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员:</text>
<text class="value">{{ item.requireName }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员电话:</text>
<text class="value">{{ item.requirePhone }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收日期:</text>
<text class="value">{{ item.receiveDate }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收人员:</text>
<text class="value">{{ item.receiveName }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收备注:</text>
<text class="value">{{ item.receiveRemark }}</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
props: {
palletAll: {
type: Object,
default: function () {
return {
files:[],
instdetailList:[],
other:null
};
}
},
ifother: {
type: Boolean,
default: false,
}
},
data() {
return {
depts:[],
dicts:[],
status:[], // 状态
palletStatus:[], // 转运状态
pallet:{}, // 配送单信息
expandedIndex:null, // 托盘列表折叠
expandedIndex1:null, // 零散物资列表折叠
other:[], // 零散物资信息
}
},
mounted() {
this._initDetail();
this.getTypes();
},
watch: {
palletAll(data) {
this._initDetail(data);
},
deep: true, // 深度监听
immediate: true, // 初次监听即执行
},
methods: {
_initDetail(palletAll = this.palletAll) {
var pallet=palletAll.pallet?palletAll.pallet:null;
this.pallet=pallet;
this.other=palletAll.other;
this.$forceUpdate();
// this.pallet.files=['https://ai-public.mastergo.com/ai/img_res/8a9623d4689b48dcfbee71429fc31982.jpg','https://ai-public.mastergo.com/ai/img_res/6d7dd5d2038fadaabc9a5fe7be497368.jpg']
// console.log(this.pallet)
},
toggleDetail(index) {
if (this.expandedIndex === index) {
this.expandedIndex = null;
} else {
this.expandedIndex = index;
}
},
toggleDetail1(index) {
if (this.expandedIndex1 === index) {
this.expandedIndex1 = null;
} else {
this.expandedIndex1 = index;
}
},
getTypes() {
//获取数据字典
this.gcs=[];
this.status=[];
var commondata = uni.getStorageSync("commondata");
if(commondata){
var data = JSON.parse(commondata);
if(data){
this.dicts=data.dicts;
this.depts=data.depts;
this.dicts.forEach(cell=>{
// console.log(cell.bmlb)
if("TPZT"==cell.bmlb){
// 托盘转运状态
this.status.push(cell);
}
if("SYZT"==cell.bmlb){
// 托盘转运状态
this.palletStatus.push(cell);
}
});
this.$forceUpdate();
}
}
else{
this.dicts=[];
this.depts=[];
this.status=[];
}
},
retType(type,str) {
var rets = '';
if(str==1){
// 状态
this.status.forEach((cell,idx)=>{
if(type==cell.bm){
rets=cell.bmsm;
return;
}
});
}
else if(str==3){
// 使用状态
this.palletStatus.forEach((cell,idx)=>{
if(type==cell.bm){
rets=cell.bmsm;
return;
}
});
}
else if(str==2){
// 部门
this.depts.forEach((cell,idx)=>{
if(type==cell.departCode){
rets=cell.departName;
return;
}
});
}
if(!rets){
rets=type
}
return rets;
},
getStatusClass(status) {
switch (status) {
case '表面接收':
return 'status-waiting';
case '建立任务':
return 'status-delivered';
case '内表面接收':
return 'status-receivedf';
case '配盘完工':
return 'status-received';
case '配送出库':
return 'status-outbound';
case '完工转运':
return 'status-complete';
default:
return 'status-default';
}
},
prviewImage(index) {
if(this.pallet&&this.pallet.files){
uni.previewImage({
urls: this.pallet.files,
current: index
});
}
},
}
}
</script>
<style lang="scss" scoped>
.container {
height: 100%;
background-color: #f5f5f5;
}
.navbar {
display: flex;
align-items: center;
height: 88rpx;
background-color: #fff;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
}
.nav-left,
.nav-right {
width: 60rpx;
display: flex;
align-items: center;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 34rpx;
font-weight: bold;
color: #333;
}
.content {
height: calc(100%);
padding: 0;
box-sizing: border-box;
}
.section {
background-color: #fff;
border-radius: 16rpx;
margin-bottom: 20rpx;
overflow: hidden;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
}
.section-header {
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.info-card {
padding: 30rpx;
}
.info-row {
display: flex;
margin-bottom: 20rpx;
}
.info-row:last-child {
margin-bottom: 0;
}
.label {
width: 200rpx;
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
.value {
flex: 1;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}
.status-used {
color: #ff6b35;
}
.status-transit {
color: #4a90e2;
}
.list-container {
padding: 0 30rpx 30rpx;
}
.list-item {
border: 1rpx solid #eee;
border-radius: 12rpx;
margin-bottom: 20rpx;
overflow: hidden;
}
.item-header {
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx 30rpx;
background-color: #f9f9f9;
}
.item-title {
display: flex;
flex: 1;
font-size: 30rpx;
font-weight: bold;
color: #333;
}
.item-content {
padding: 20rpx 30rpx;
}
.detail-row {
display: flex;
margin-bottom: 15rpx;
}
.detail-row:last-child {
margin-bottom: 0;
}
.image-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
padding: 30rpx;
}
.image-item {
border-radius: 12rpx;
overflow: hidden;
aspect-ratio: 1;
}
.image {
width: 100%;
height: 100%;
}
.status-badge {
padding: 6rpx 12rpx;
border-radius: 10rpx;
font-size: 24rpx;
color: #fff;
display: flex;
align-items: center;
margin-right: 10rpx;
}
.status-waiting {
background-color: #faad14;
}
.status-delivered {
background-color: #1890ff;
}
.status-receivedf {
background-color: #52c41a;
}
.status-received {
background-color: #18b566;
}
.status-outbound {
background-color: #fca600;
}
.status-complete {
background-color: #c191e8;
}
.status-default {
background-color: #f5f5f5;
color: #666666;
}
</style>

@ -0,0 +1,295 @@
<template>
<view>
<view class="upload">
<block v-for="(upload,index) in uploads" :key="index">
<view class="uplode-file">
<image v-if="types == 'image'" class="uploade-img" :src="upload" :data-src="upload" @tap="previewImage"></image>
<image v-if="types == 'image'" class="clear-one-icon" :src="clearIcon" @tap="delImage(index)"></image>
<video v-if="types == 'video'" class="uploade-img" :src="upload" controls>
<cover-image v-if="types == 'video'" class="clear-one-icon" :src="clearIcon" @tap="delImage(index)"></cover-image>
</video>
</view>
</block>
<view v-if="uploads.length < uploadCount" :class="uploadIcon ? 'uploader-icon' : 'uploader-input-box'">
<view v-if="!uploadIcon" class="uploader-input" @tap="chooseUploads"></view>
<image v-else class="image-cion" :src="uploadIcon" @tap="chooseUploads"></image>
</view>
</view>
<button type="primary" v-if="types == 'image' && !autoUpload" @tap="unifiedUpload">上传</button>
</view>
</template>
<script>
export default{
props: {
types: {
type: String,
default: 'image'
},
dataList: {
type: Array,
default: function() {
return []
}
},
clearIcon: {
type: String,
default: 'http://img1.imgtn.bdimg.com/it/u=451604666,2295832001&fm=26&gp=0.jpg'
},
uploadIcon: {
type: String,
default: ''
},
uploadUrl: {
type: String,
default: ''
},
deleteUrl: {
type: String,
default: ''
},
uploadCount: {
type: Number,
default: 1
},
//上传图片大小 默认3M
upload_max: {
type: Number,
default: 3
},
autoUpload: {
type: Boolean,
default: false
}
},
data(){
return {
//上传的图片地址
uploadImages: [],
//展示的图片地址
uploads: [],
// 超出限制数组
exceeded_list: [],
}
},
watch:{
dataList:{
handler(val){
this.uploads = val;
},
immediate: true
}
},
methods:{
previewImage (e) {
var current = e.target.dataset.src
uni.previewImage({
current: current,
urls: this.dataList
})
},
chooseUploads(){
switch (this.types){
case 'image':
uni.chooseImage({
count: this.uploadCount - this.uploads.length, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], //从相册选择
success: (res) => {
for(let i = 0; i< res.tempFiles.length; i++){
if(Math.ceil(res.tempFiles[i].size / 1024) < this.upload_max * 1024){
this.uploads.push(res.tempFiles[i].path)
if(this.autoUpload){
this.uploadFile(res.tempFiles[i].path)
}else{
this.uploadImages.push(res.tempFiles[i].path);
}
}else {
this.exceeded_list.push(i === 0 ? 1 : i + 1);
uni.showModal({
title: '提示',
content: `第${[...new Set(this.exceeded_list)].join(',')}张图片超出限制${this.upload_max}MB,已过滤`
});
}
}
},
fail: (err) => {
uni.showModal({
content: JSON.stringify(err)
});
}
});
break;
case 'video' :
uni.chooseVideo({
sourceType: ['camera', 'album'],
success: (res) => {
if(Math.ceil(res.size / 1024) < this.upload_max * 1024){
this.uploads.push(res.tempFilePath)
uni.uploadFile({
url: this.uploadUrl, //仅为示例,非真实的接口地址
filePath: res.tempFilePath,
name: 'file',
//请求参数
formData: {
'user': 'test'
},
success: (uploadFileRes) => {
this.$emit('successVideo',uploadFileRes)
}
});
}else {
uni.showModal({
title: '提示',
content: `第${[...new Set(this.exceeded_list)].join(',')}张视频超出限制${this.upload_max}MB,已过滤`
});
}
},
fail: (err) => {
uni.showModal({
content: JSON.stringify(err)
});
}
});
break;
}
},
delImage(index){
//第一个是判断app或者h5的 第二个是判断小程序的
if(this.uploads[index].substring(0,4) !== 'http' || this.uploads[index].substring(0,11) == 'http://tmp/'){
this.uploads.splice(index,1)
return;
};
if(!this.deleteUrl) {
uni.showModal({
content: '请填写删除接口'
});
return;
};
uni.request({
url: this.deleteUrl,
method: 'DELETE',
data: {
image: this.dataList[index]
},
success: res => {
if(res.data.status == 1) {
uni.showToast({
title: '删除成功'
})
this.uploads.splice(index,1)
}
},
});
},
uploadFile(path){
uni.uploadFile({
url: this.uploadUrl, //仅为示例,非真实的接口地址
filePath: path,
name: 'file',
//自定义请求参数
formData: {
'user': 'test'
},
success: (uploadFileRes) => {
this.$emit('successImage',uploadFileRes)
}
});
},
unifiedUpload(){
if(!this.uploadUrl) {
uni.showModal({
content: '请填写上传接口'
});
return;
};
for (let i of this.uploadImages) {
this.uploadFile(i)
}
}
}
}
</script>
<style scoped>
.upload {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.uplode-file {
margin: 10upx;
width: 210upx;
height: 210upx;
position: relative;
}
.uploade-img {
display: block;
width: 210upx;
height: 210upx;
}
.clear-one{
position: absolute;
top: -10rpx;
right: 0;
}
.clear-one-icon{
position: absolute;
width: 20px;
height: 20px;
top: 0;
right: 0;
z-index: 9;
}
.uploader-input-box {
position: relative;
margin:10upx;
width: 208upx;
height: 208upx;
border: 2upx solid #D9D9D9;
}
.uploader-input-box:before,
.uploader-input-box:after {
content: " ";
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
background-color: #D9D9D9;
}
.uploader-input-box:before {
width: 4upx;
height: 79upx;
}
.uploader-input-box:after {
width: 79upx;
height: 4upx;
}
.uploader-input-box:active {
border-color: #999999;
}
.uploader-input-box:active:before,
.uploader-input-box:active:after {
background-color: #999999;
}
.uploader-input {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
}
.uploader-icon{
position: relative;
margin:10upx;
width: 208upx;
height: 208upx;
}
.uploader-icon .image-cion{
width: 100%;
height: 100%;
}
</style>

@ -0,0 +1,241 @@
<template>
<view class="uni-combox">
<view v-if="label" class="uni-combox__label" :style="labelStyle">
<text>{{label}}</text>
</view>
<view class="uni-combox__input-box">
<input class="uni-combox__input" type="text" :placeholder="placeholder" v-model="inputVal" @input="onInput" @focus="onFocus" @blur="onBlur" />
<!-- <uni-icons class="uni-combox__input-arrow" type="arrowdown" size="14" @click="toggleSelector"></uni-icons> 源代码注释掉上下距离太高不好看,去掉源码中class-->
<uni-icons type="arrowdown" size="18" v-if="inputVal===''" color="#999999" @click="toggleSelector"></uni-icons> <!-- 下箭头颜色#999999 -->
<uni-icons type="clear" size="18" v-else color="#999999" @click="clearInputVal"></uni-icons> <!-- add by limeng 追加的代码片段用叉号图标快速清空输入框 -->
<view class="uni-combox__selector" v-if="showSelector">
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0">
<text>{{emptyTips}}</text>
</view>
<view class="uni-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index" @click="onSelectorClick(index)">
<text>{{item}}</text>
</view>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
import uniIcons from '../uni-icons/uni-icons.vue'
export default {
name: 'uniCombox',
components: {
uniIcons
},
props: {
label: {
type: String,
default: ''
},
labelWidth: {
type: String,
default: 'auto'
},
placeholder: {
type: String,
default: ''
},
/** 不再需要这个属性
candidates: {
type: Array,
default () {
return []
}
},*/
//add by limeng 20210702 增加 map 类型的属性
candidatesMap: {
type: Map,//这个类型会被警告但是不影响使用
default () {
return {}
}
},
emptyTips: {
type: String,
default: '无匹配项'
},
value: {
type: String,
default: ''
}
},
data() {
return {
showSelector: false,
inputVal: '', //输入框中输入的字符
inputValId: '',//add by limeng 真实往后台传递的下拉id标识(比如项目id)
}
},
computed: {
labelStyle() {
if (this.labelWidth === 'auto') {
return {}
}
return {
width: this.labelWidth
}
},
filterCandidates() {
//从candidatesMap 取值遍历所有key并赋值给内部变量candidates这个数组
var candidates = [];//数组清空
this.candidatesMap.forEach(function(value, key){
var key = key;
candidates.push(key);//获取的值给内部变量赋值
})
return candidates.filter((item) => {
return item.indexOf(this.inputVal) > -1
})
},
filterCandidatesLength() {
return this.filterCandidates.length
}
},
watch: {
value: {
handler(newVal) {
this.inputVal = newVal
},
immediate: true
},
},
methods: {
toggleSelector() {
this.showSelector = !this.showSelector
},
onFocus() {
this.showSelector = true
},
onBlur() {
/**update by limeng 20210710 上午周六
离开输入框焦点的时候输入框里的内容必须包含在下拉框列表中,
否则输入框内容是用户瞎写的没有意义,后台也无法识别
因此,强制用户必须以选中的为准
备注:提供输入功能仅仅是为了匹配合适的下拉选项,但不能以输入的值为准,必须以选中的为准
*/
//if(this.candidates.indexOf(this.inputVal) > -1){ //则包含该元素
if(this.filterCandidates.indexOf(this.inputVal) > -1){ //则包含该元素
//alert("你输值在列表中");
//关闭下拉(原代码保留)
setTimeout(() => {
this.showSelector = false
}, 50)
}else {
//alert("你输的值不在列表中,此时下拉列表不能关闭,直到用户选中才能关闭下拉");
return;
}
},
onSelectorClick(index) {//index 只是这个数组中顺序的索引值比如 1,2,3...,和map中的key value没有关系
this.inputVal = this.filterCandidates[index]//选中后给控件的输入框赋值
this.inputValId = this.candidatesMap.get(this.inputVal);//根据输入框内容反查出对应的id或者code(以便提交到后台)
this.showSelector = false;//选中后关闭下拉列表
this.$emit('input', this.inputVal);//拿到子组件的值(name)赋值给父组件的input事件,即父组件的v-model绑定的属性
this.$emit("setId",this.inputValId);//将name对应的id或者code返回给父组件,通过调用父组件的setId方法传值给父组件data中声明的变量
},
onInput() {
setTimeout(() => {
this.$emit('input', this.inputVal)
})
},
clearInputVal(){
this.inputVal='';
this.inputValId = '';//同时清空输入框id
this.$emit("setId",'');//将父组件的值也置为空
}
}
}
</script>
<style scoped>
.uni-combox {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
height: 40px;
flex-direction: row;
align-items: center;
/* border-bottom: solid 1px #DDDDDD;
*/
}
.uni-combox__label {
font-size: 16px;
line-height: 22px;
padding-right: 10px;
color: #999999;
}
.uni-combox__input-box {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
align-items: center;
}
.uni-combox__input {
flex: 1;
font-size: 33upx;/*16px*/
height: 25px;
line-height: 22px;
}
.uni-combox__input-arrow {
padding: 10px;
}
.uni-combox__selector {
box-sizing: border-box;
position: absolute;
top: 42px;
left: 0;
width: 100%;
background-color: #FFFFFF;
border-radius: 0px;
box-shadow: #DDDDDD 4px 4px 8px, #DDDDDD -4px -4px 8px;
z-index: 2;
}
.uni-combox__selector-scroll {
max-height: 500px;/*200px*/
box-sizing: border-box;
}
.uni-combox__selector::before {
content: '';
position: absolute;
width: 0;
height: 0;
border-bottom: solid 6px #FFFFFF;
border-right: solid 6px transparent;
border-left: solid 6px transparent;
left: 50%;
top: -6px;
margin-left: -6px;
}
.uni-combox__selector-empty,
.uni-combox__selector-item {
/* #ifdef APP-NVUE */
display: flex;
/* #endif */
line-height: 50px;/*36px*/
font-size: 33upx;/* 14px*/
text-align: center;
border-bottom: solid 1px #DDDDDD;
margin: 0px 10px;
}
.uni-combox__selector-empty:last-child,
.uni-combox__selector-item:last-child {
border-bottom: none;
}
</style>

@ -0,0 +1,450 @@
<template>
<view class="container">
<!-- 主内容区域 -->
<scroll-view class="content" scroll-y="true">
<!-- 托盘明细 -->
<view class="section">
<view class="section-header">
<text class="section-title">托盘明细</text>
</view>
<!-- 托盘明细 -->
<view class="list-container" v-if="item">
<view class="list-item">
<view class="item-header">
<text class="item-title">{{ item.assemcode }}</text>
<text class="status-badge" :class="getStatusClass(item.status)">{{item.status}}</text>
</view>
<view class="item-content">
<view class="detail-row">
<text class="label">工程编号:</text>
<text class="value">{{ item.project }}</text>
</view>
<view class="detail-row">
<text class="label">安装托盘表号:</text>
<text class="value">{{ item.instno }}</text>
</view>
<view class="detail-row">
<text class="label">制作图号:</text>
<text class="value">{{ item.dwgno }}</text>
</view>
<view class="detail-row">
<text class="label">分段号:</text>
<text class="value">{{ item.section }}</text>
</view>
<view class="detail-row">
<text class="label">规格:</text>
<text class="value">{{ item.spec }}</text>
</view>
<view class="detail-row">
<text class="label">材质:</text>
<text class="value">{{ item.grd }}</text>
</view>
<view class="detail-row">
<text class="label">数量:</text>
<text class="value">{{ item.qty }}</text>
</view>
<view class="detail-row">
<text class="label">重量:</text>
<text class="value">{{ item.weight }}</text>
</view>
<view class="detail-row">
<text class="label">表面处理:</text>
<text class="value">{{ item.treatment }}</text>
</view>
<view class="detail-row">
<text class="label">涂装代码:</text>
<text class="value">{{ item.paintcode }}</text>
</view>
<view class="detail-row">
<text class="label">状态日期:</text>
<text class="value">{{ item.statusDate }}</text>
</view>
<view class="detail-row">
<text class="label">制作单位:</text>
<text class="value">{{ item.manuDept }}</text>
</view>
<view class="detail-row">
<text class="label">处理单位:</text>
<text class="value">{{ item.treatDept }}</text>
</view>
<view class="detail-row">
<text class="label">配送单位:</text>
<text class="value">{{ item.deliverDept }}</text>
</view>
<view class="detail-row">
<text class="label">工装托盘编号:</text>
<text class="value">{{ item.palletNo }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">工装托盘转运记录ID:</text>
<text class="value">{{ item.deliveryId }}</text>
</view> -->
<view class="detail-row">
<text class="label">配送单号:</text>
<text class="value">{{ item.deliveryNo }}</text>
</view>
<view class="detail-row">
<text class="label">配送车辆:</text>
<text class="value">{{ item.deliveryCar }}</text>
</view>
<view class="detail-row">
<text class="label">配送日期:</text>
<text class="value">{{ item.deliveryDate }}</text>
</view>
<view class="detail-row">
<text class="label">配送备注:</text>
<text class="value">{{ item.deliveryRemark }}</text>
</view>
<view class="detail-row">
<text class="label">需求日期:</text>
<text class="value">{{ item.requireRate }}</text>
</view>
<view class="detail-row">
<text class="label">需求单位代码:</text>
<text class="value">{{ retType(item.requireDepartCode,2) }}</text>
</view>
<view class="detail-row">
<text class="label">配送地址:</text>
<text class="value">{{ item.requireAddress }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员:</text>
<text class="value">{{ item.requireName }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员电话:</text>
<text class="value">{{ item.requirePhone }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收日期:</text>
<text class="value">{{ item.receiveDate }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收人员:</text>
<text class="value">{{ item.receiveName }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收备注:</text>
<text class="value">{{ item.receiveRemark }}</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
props: {
pallet: {
type: Object,
default: null
}
},
data() {
return {
item: null,
depts:[],
dicts:[],
status:[], // 状态
}
},
mounted() {
this._initDetail();
this.getTypes();
},
watch: {
pallet(data) {
this._initDetail(data);
},
deep: true, // 深度监听
immediate: true, // 初次监听即执行
},
methods: {
_initDetail(pallet = this.pallet) {
this.item=pallet;
this.$forceUpdate();
},
getTypes() {
//获取数据字典
this.gcs=[];
this.status=[];
var commondata = uni.getStorageSync("commondata");
if(commondata){
var data = JSON.parse(commondata);
if(data){
this.dicts=data.dicts;
this.depts=data.depts;
this.dicts.forEach(cell=>{
// console.log(cell.bmlb)
if("TPZT"==cell.bmlb){
// 托盘转运状态
this.status.push(cell);
}
if("SYZT"==cell.bmlb){
// 托盘转运状态
this.palletStatus.push(cell);
}
});
this.$forceUpdate();
}
}
else{
this.dicts=[];
this.depts=[];
this.status=[];
}
},
retType(type,str) {
var rets = '';
if(str==1){
// 状态
this.status.forEach((cell,idx)=>{
if(type==cell.bm){
rets=cell.bmsm;
return;
}
});
}
else if(str==3){
// 使用状态
this.palletStatus.forEach((cell,idx)=>{
if(type==cell.bm){
rets=cell.bmsm;
return;
}
});
}
else if(str==2){
// 部门
this.depts.forEach((cell,idx)=>{
if(type==cell.departCode){
rets=cell.departName;
return;
}
});
}
if(!rets){
rets=type
}
return rets;
},
getStatusClass(status) {
switch (status) {
case '表面接收':
return 'status-waiting';
case '建立任务':
return 'status-delivered';
case '内表面接收':
return 'status-receivedf';
case '配盘完工':
return 'status-received';
case '配送出库':
return 'status-outbound';
case '完工转运':
return 'status-complete';
default:
return 'status-default';
}
},
}
}
</script>
<style lang="scss" scoped>
.container {
height: 100%;
background-color: #f5f5f5;
}
.navbar {
display: flex;
align-items: center;
height: 88rpx;
background-color: #fff;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
}
.nav-left,
.nav-right {
width: 60rpx;
display: flex;
align-items: center;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 34rpx;
font-weight: bold;
color: #333;
}
.content {
height: calc(100%);
padding: 0;
box-sizing: border-box;
}
.section {
background-color: #fff;
border-radius: 16rpx;
margin-bottom: 20rpx;
overflow: hidden;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
}
.section-header {
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.info-card {
padding: 30rpx;
}
.info-row {
display: flex;
margin-bottom: 20rpx;
}
.info-row:last-child {
margin-bottom: 0;
}
.label {
width: 200rpx;
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
.value {
flex: 1;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}
.status-used {
color: #ff6b35;
}
.status-transit {
color: #4a90e2;
}
.list-container {
padding: 20rpx 30rpx 30rpx;
}
.list-item {
border: 1rpx solid #eee;
border-radius: 12rpx;
margin-bottom: 20rpx;
overflow: hidden;
}
.item-header {
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx 30rpx;
background-color: #f9f9f9;
}
.item-title {
display: flex;
flex: 1;
font-size: 30rpx;
font-weight: bold;
color: #333;
}
.item-content {
padding: 20rpx 30rpx;
}
.detail-row {
display: flex;
margin-bottom: 15rpx;
}
.detail-row:last-child {
margin-bottom: 0;
}
.image-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
padding: 30rpx;
}
.image-item {
border-radius: 12rpx;
overflow: hidden;
aspect-ratio: 1;
}
.image {
width: 100%;
height: 100%;
}
.status-badge {
padding: 6rpx 12rpx;
border-radius: 10rpx;
font-size: 24rpx;
color: #fff;
display: flex;
align-items: center;
margin-right: 10rpx;
}
.status-waiting {
background-color: #faad14;
}
.status-delivered {
background-color: #1890ff;
}
.status-receivedf {
background-color: #52c41a;
}
.status-received {
background-color: #18b566;
}
.status-outbound {
background-color: #fca600;
}
.status-complete {
background-color: #c191e8;
}
.status-default {
background-color: #f5f5f5;
color: #666666;
}
</style>

@ -0,0 +1,356 @@
<template>
<view class="noTabBarPage">
<view class="cu-timeline" style="margin-bottom: 10upx;padding:20rpx 0">
<view class="textjd">始</view>
<block v-for="(item,idx) in buslinks" :key="idx">
<view class="cu-item" :class="item.color">
<view class="text-xh">
{{ idx+1 }}
</view>
<view class="content">
<view class="con">
<text v-if="item.stepContent" class="texttop" style="font-weight: 600; margin-right: 16rpx;">
{{item.stepContent}}
</text>
<text v-if="item.result" class="kuang" :class="item.b2">
<text class="kuang1" :class="item.b1">{{item.result}}</text>
</text>
</view>
<view style="margin-top:10rpx">
<text v-if="item.name" class="texttop" style="margin-right: 8rpx;color:#446ea0"> {{item.name}} {{item.dept?'/':''}}</text>
<text v-if="item.dept" class="texttop" style="margin-right: 8rpx;color:#446ea0"> {{item.dept}}</text>
<text v-if="item.dotime" class="texttop" style="margin-left: 8rpx;color:#828E99"> {{(item.dotime).substr(0,16)}}</text>
</view>
<view v-if="item.remark">
<text class="textremark" style="margin-right: 6rpx;"> {{item.stepContent=='整改完成'?'整改内容:':(item.stepContent=='整改已验证'?'验证内容:':'审批意见:')}}</text>
<text class="textremark"> {{item.remark}}</text>
</view>
</view>
</view>
</block>
<view v-if="ifend" class="textjd endall">末</view>
<view v-else class="textjd end"></view>
</view>
</view>
</template>
<script>
export default {
props: {
range: {
type: Array,
default: function () {
return [];
}
},
ifend: {
type: Boolean,
default: false,
}
},
data() {
return {
buslinks:[]
}
},
mounted() {
this._initTree();
},
watch: {
range(list) {
this._initTree(list);
},
deep: true, // 深度监听
immediate: true, // 初次监听即执行
},
methods: {
_initTree(range = this.range) {
this.buslinks=[];
if (range.length > 0) {
range.forEach((item,idx)=>{
var cell={};
var result='',b1 = 'blue1',b2 = 'blue2',color = "line-blue";
if (item.opinionType == '0') {
// 置灰流程
result="";
b1 = '';
b2 = '';
color = "line-grey";
}
else if (item.opinionType == '1') {
// 同意
result="同意";
b1 = 'green1';
b2 = 'green2';
color = "line-blue";
}
else if(item.opinionType == '2'){
// 不同意
result="不同意";
b1 = 'red1';
b2 = 'red2';
color = "line-red";
}
else if(item.opinionType == '3'){
// 完成
result="完成";
b1 = 'green1';
b2 = 'green2';
color = "line-blue";
}
else if(item.opinionType == '4'){
// 已确认
result="已确认";
b1 = 'blue1';
b2 = 'blue2';
color = "line-blue";
}
else if(item.opinionType == '5'){
// 开始整改
result="开始整改";
b1 = 'blue1';
b2 = 'blue2';
color = "line-blue";
}
else if(item.opinionType == '6'){
// 整改完成
result="整改完成";
b1 = 'blue1';
b2 = 'blue2';
color = "line-blue";
}
else if(item.opinionType == '7'){
// 司机开始
result="司机开始";
b1 = 'blue1';
b2 = 'blue2';
color = "line-blue";
}
else if(item.opinionType == '8'){
// 司机结束
result="司机结束";
b1 = 'blue1';
b2 = 'blue2';
color = "line-blue";
}
else {
if (item.isStart&&item.isStart=='1') {
// 发起申请
result="已申请";
color = "line-blue";
}
else{
// 待审批
result="待审批";
color = "";
}
b1 = 'blue1';
b2 = 'blue2';
}
cell={
name: item.name,
dept: item.dept,
stepContent: item.stepContent,// 审批内容
dotime: item.dotime? item.dotime:"",
result: result,
remark: item.remark? item.remark:"",
b1: b1,
b2: b2,
color: color
};
console.log(item)
this.buslinks.push(cell);
});
}
}
}
}
</script>
<style lang="scss" scoped>
.noTabBarPage{
width: 100%;
background: url('@/static/images/pagebackimg.jpg') no-repeat top center ;
background-size:100% 100%;
}
.cu-timeline>.cu-item.line-blue::after{
background-color:#347ACF;
}
.cu-timeline>.cu-item.line-grey::after{
background-color:#FFF;
border-left:1rpx dashed #CCC;
}
.cu-timeline>.cu-item.line-red::after{
background-color:#da533e;
}
.text-xh{
left:34rpx!important;
}
.line-grey{
color:#b0b0b0 !important;
}
.line-grey .text-xh{
border:1rpx dashed #CCC;
color:#b0b0b0;
}
.line-grey .texttop{
color:#b0b0b0 !important;
}
.line-blue .text-xh{
border:1rpx solid #347ACF;
color:#347ACF;
}
.line-red .text-xh{
border:1px solid #da533e;
color:#da533e;
}
.blue1{
border:1px solid #347acf;
color:#347acf;
}
.blue2{
border:2px solid #347acf;
}
.green1{
border:1px solid #28994e;
color:#28994e;
}
.green2{
border:2px solid #28994e;
}
.red1{
border:1px solid #da533e;
color:#da533e;
}
.red2{
border:2px solid #da533e;
}
.orange1{
border:1px solid #edab26;
color:#edab26;
}
.orange2{
border:2px solid #edab26;
}
.kuang{
padding:2px 2px 3px 2px;
margin-right:5px;
.kuang1{
padding:1px;
font-size:12px;
}
}
.con{
width: 100%;
}
.cu-timeline>.cu-item{
padding: 30rpx 30rpx 30rpx 96rpx !important;
}
.cu-timeline>.cu-item::before{
left: 34rpx!important;
}
.cu-timeline>.cu-item::after{
left: 60rpx!important;
}
.cu-timeline>.cu-item>.content{
padding:25rpx 20rpx;
}
.texttop{
color:#000;
}
.textbottom{
color:#347ACF;
font-weight: 600;
}
.textbottomred{
color:#ff0000;
font-weight: 600;
}
.textremark{
color:#000;
}
.tx{
position: relative;
overflow: hidden;
width:100%;
height:150upx;
}
.textjd{
margin: 0 0 0 30rpx!important;
width:56rpx;
height:56rpx;;
line-height:56rpx;
}
.textjd.end{
background-color: #eee;
border: 1px solid #eee;
}
.textjd.endall{
background-color: #347ACF;
border: 1px solid #347ACF;
}
.txgd{
position:absolute;
right:20upx;
top:10upx;
}
.ltx{
position: relative;
overflow: hidden;
width:100%;
height:80upx;
line-height:80upx;
}
.fright{
position:absolute;
right:20upx;
top:0;
}
.cu-form-group{
padding: 2upx 20upx;
}
.cu-form-group .title {
min-width: calc(4em + 15px);
}
.padd{
padding:20upx;
}
.cu-padd-bottom{
margin-bottom: 20upx;
}
.busimg{
position: absolute;
top:20upx;
left:0;
width:40upx;
height:40upx;
vertical-align: middle;
}
.busitimg{
position: absolute;
top:20upx;
left:80upx;
width:52upx;
height:52upx;
vertical-align: middle;
}
.bottomcon{
position: fixed;
bottom:0;
left:0;
width:100%;
display: block;
height:80upx;
z-index: 10000;
}
.tipimg{
width:36upx;
height:36upx;
}
.cuIcon-refresh{
font-size: 36upx;
margin-right: 4upx;
font-weight: 600;
}
</style>

@ -0,0 +1,801 @@
<template>
<view class="container">
<!-- 主内容区域 -->
<scroll-view class="content" scroll-y="true">
<!-- 基础信息 -->
<view class="section">
<view class="section-header">
<text class="section-title">基础信息</text>
</view>
<view class="info-card" v-if="pallet">
<view class="info-row">
<text class="label">工装托盘编号:</text>
<text class="value">{{pallet.palletNo || '-' }}</text>
</view>
<!-- <view class="info-row">
<text class="label">外形尺寸:</text>
<text class="value">{{pallet.size || '-' }}</text>
</view>
<view class="info-row">
<text class="label">载重:</text>
<text class="value">{{pallet.load || '-' }}</text>
</view>
<view class="info-row">
<text class="label">使用状态:</text>
<text class="value status-used">{{ retType(pallet.palletStatus,3) || '-' }}</text>
</view>
<view class="info-row">
<text class="label">创建日期:</text>
<text class="value">{{pallet.createDate || '-' }}</text>
</view>
<view class="info-row">
<text class="label">备注:</text>
<text class="value">{{pallet.remark || '-' }}</text>
</view> -->
<view class="info-row">
<text class="label">转运状态:</text>
<text class="value status-transit">{{ retType(pallet.status,1)|| '-' }}</text>
</view>
<!-- <view class="info-row">
<text class="label">当前转运状态:</text>
<text class="value">{{pallet.deliveryId || '-' }}</text>
</view> -->
<view class="info-row">
<text class="label">存放部门:</text>
<text class="value">{{ retType(pallet.departCode,2) || '-' }}</text>
</view>
<view class="info-row">
<text class="label">存放工场:</text>
<text class="value">{{pallet.workshop || '-' }}</text>
</view>
<view class="info-row">
<text class="label">存放区域:</text>
<text class="value">{{pallet.location || '-' }}</text>
</view>
<view class="info-row">
<text class="label">存放地址:</text>
<text class="value">{{pallet.address || '-' }}</text>
</view>
<view class="info-row">
<text class="label">确认时间:</text>
<text class="value">{{pallet.confirmTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">确认人员:</text>
<text class="value">{{pallet.confirmName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">存放天数:</text>
<text class="value">{{pallet.stayDays || '-' }}</text>
</view>
<view class="info-row">
<text class="label">装盘船只:</text>
<text class="value">{{pallet.loadProject || '-' }}</text>
</view>
<view class="info-row">
<text class="label">装盘安装托盘表号:</text>
<text class="value">{{pallet.loadInst || '-' }}</text>
</view>
<view class="info-row">
<text class="label">装盘数量:</text>
<text class="value">{{pallet.loadQty || '-' }}</text>
</view>
<view class="info-row">
<text class="label">装盘信息:</text>
<text class="value">{{pallet.loadDesc || '-' }}</text>
</view>
<view class="info-row" v-if="pallet.status=='03'||pallet.status=='04'">
<text class="label">去向部门:</text>
<text class="value">{{ retType(pallet.toDepartCode,2) || '-' }}</text>
</view>
<view class="info-row" v-if="pallet.status=='03'||pallet.status=='04'">
<text class="label">去向工场:</text>
<text class="value">{{pallet.toWorkshop || '-' }}</text>
</view>
<view class="info-row" v-if="pallet.status=='03'||pallet.status=='04'">
<text class="label">去向位置:</text>
<text class="value">{{pallet.toLocation || '-' }}</text>
</view>
<view class="info-row" v-if="pallet.status=='03'||pallet.status=='04'">
<text class="label">去向地址:</text>
<text class="value">{{pallet.toAddress || '-' }}</text>
</view>
<view class="info-row">
<text class="label">转运时间:</text>
<text class="value">{{pallet.fromTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">转运人员:</text>
<text class="value">{{pallet.fromName || '-' }}</text>
</view>
<!-- <view class="info-row">
<text class="label">装盘时间:</text>
<text class="value">{{pallet.loadTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">装盘人:</text>
<text class="value">{{pallet.loadName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送单号:</text>
<text class="value">{{pallet.deliveryNo || '-' }}</text>
</view>
<view class="info-row">
<text class="label">车辆牌号:</text>
<text class="value">{{pallet.deliveryCar || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运部门:</text>
<text class="value">{{ retType(pallet.fromDepartCode,2)|| '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运工场:</text>
<text class="value">{{pallet.fromWorkshop || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运区域:</text>
<text class="value">{{pallet.fromLocation || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运地址:</text>
<text class="value">{{pallet.fromAddress || '-' }}</text>
</view>
<view class="info-row">
<text class="label">配送/转运人员电话:</text>
<text class="value">{{pallet.fromPhone || '-' }}</text>
</view> -->
<!-- <view class="info-row">
<text class="label">配送/转运备注:</text>
<text class="value">{{pallet.fromRemark || '-' }}</text>
</view>
<view class="info-row">
<text class="label">去向接收人员:</text>
<text class="value">{{pallet.toName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">去向接收人员电话:</text>
<text class="value">{{pallet.toPhone || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收部门:</text>
<text class="value">{{ retType(pallet.receiveDepartCode,2) || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收工场:</text>
<text class="value">{{pallet.receiveWorkshop || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收区域:</text>
<text class="value">{{pallet.receiveLocation || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收地址:</text>
<text class="value">{{pallet.receiveAddress || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收时间:</text>
<text class="value">{{pallet.receiveTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收人员:</text>
<text class="value">{{pallet.receiveName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收人员电话:</text>
<text class="value">{{pallet.receivePhone || '-' }}</text>
</view>
<view class="info-row">
<text class="label">接收备注:</text>
<text class="value">{{pallet.receiveRemark || '-' }}</text>
</view>
<view class="info-row">
<text class="label">卸盘时间:</text>
<text class="value">{{pallet.finishTime || '-' }}</text>
</view>
<view class="info-row">
<text class="label">卸盘人员:</text>
<text class="value">{{pallet.finishName || '-' }}</text>
</view>
<view class="info-row">
<text class="label">卸盘人员电话:</text>
<text class="value">{{pallet.finishPhone || '-' }}</text>
</view>
<view class="info-row">
<text class="label">卸盘备注:</text>
<text class="value">{{pallet.finishRemark || '-' }}</text>
</view> -->
</view>
</view>
<!-- 装盘明细 -->
<view class="section">
<view class="section-header">
<text class="section-title">装盘明细({{pallet&&pallet.instdetailList?pallet.instdetailList.length:0}})</text>
</view>
<view class="list-container" v-if="pallet&&pallet.instdetailList">
<view v-for="(item, index) in pallet.instdetailList" :key="index" class="list-item">
<view class="item-header" @click="gotocxDetail(item.instno,item.project)">
<text class="item-tip">{{ item.groupDesc }} ({{ item.qty?parseFloat(item.qty).toFixed(2):'0.00'}})</text>
</view>
<view class="item-header" @click="toggleDetail(index)">
<text class="item-title">{{ item.assemcode }} ({{ item.qty?parseFloat(item.qty).toFixed(2):'0.00' }})</text>
<!-- <text class="status-badge" :class="getStatusClass(item.status)">{{item.status}}</text> -->
<uni-icons :type="expandedIndex === index ? 'arrowup' : 'arrowdown'" size="16" color="#999"></uni-icons>
</view>
<view v-if="expandedIndex === index" class="item-content">
<view class="detail-row">
<text class="label">工程编号:</text>
<text class="value">{{ item.project }}</text>
</view>
<view class="detail-row">
<text class="label">安装托盘表号:</text>
<text class="value">{{ item.instno }}</text>
</view>
<view class="detail-row">
<text class="label">制作图号:</text>
<text class="value">{{ item.dwgno }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">分段号:</text>
<text class="value">{{ item.section }}</text>
</view> -->
<view class="detail-row">
<text class="label">规格:</text>
<text class="value">{{ item.spec }}</text>
</view>
<view class="detail-row">
<text class="label">材质:</text>
<text class="value">{{ item.grd }}</text>
</view>
<view class="detail-row">
<text class="label">数量:</text>
<text class="value">{{ item.qty }}</text>
</view>
<view class="detail-row">
<text class="label">重量:</text>
<text class="value">{{ item.weight }}</text>
</view>
<view class="detail-row">
<text class="label">表面处理:</text>
<text class="value">{{ item.treatment }}</text>
</view>
<view class="detail-row">
<text class="label">涂装代码:</text>
<text class="value">{{ item.paintcode }}</text>
</view>
<view class="detail-row">
<text class="label">修改类型:</text>
<text class="value">{{ item.modifyType }}</text>
</view>
<view class="detail-row">
<text class="label">修改卡号:</text>
<text class="value">{{ item.modifyKh }}</text>
</view>
<view class="detail-row">
<text class="label">修改通知单号:</text>
<text class="value">{{ item.modifyDwgno }}</text>
</view>
<view class="detail-row">
<text class="label">修改日期:</text>
<text class="value">{{ item.modifyDate }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">生产状态:</text>
<text class="value">{{ item.status }}</text>
</view> -->
<!-- <view class="detail-row">
<text class="label">状态日期:</text>
<text class="value">{{ item.statusDate }}</text>
</view> -->
<view class="detail-row">
<text class="label">制作单位:</text>
<text class="value">{{ item.manuDept }}</text>
</view>
<view class="detail-row">
<text class="label">处理单位:</text>
<text class="value">{{ item.treatDept }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">配送单位:</text>
<text class="value">{{ item.deliverDept }}</text>
</view> -->
<view class="detail-row">
<text class="label">工装托盘编号:</text>
<text class="value">{{ item.palletNo }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">工装托盘转运记录ID:</text>
<text class="value">{{ item.deliveryId }}</text>
</view> -->
<!-- <view class="detail-row">
<text class="label">配送单号:</text>
<text class="value">{{ item.deliveryNo }}</text>
</view> -->
<view class="detail-row">
<text class="label">配送车辆:</text>
<text class="value">{{ item.deliveryCar }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">配送日期:</text>
<text class="value">{{ item.deliveryDate }}</text>
</view>
<view class="detail-row">
<text class="label">配送备注:</text>
<text class="value">{{ item.deliveryRemark }}</text>
</view> -->
<view class="detail-row">
<text class="label">需求日期:</text>
<text class="value">{{ item.requireRate }}</text>
</view>
<view class="detail-row">
<text class="label">需求单位:</text>
<text class="value">{{ retType(item.requireDepartCode,2) }}</text>
</view>
<view class="detail-row">
<text class="label">配送地址:</text>
<text class="value">{{ item.requireAddress }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员:</text>
<text class="value">{{ item.requireName }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员电话:</text>
<text class="value">{{ item.requirePhone }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">实际接收日期:</text>
<text class="value">{{ item.receiveDate }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收人员:</text>
<text class="value">{{ item.receiveName }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收备注:</text>
<text class="value">{{ item.receiveRemark }}</text>
</view> -->
</view>
</view>
</view>
</view>
<!-- 配送、转运图片 -->
<view class="section">
<view class="section-header">
<text class="section-title">配送、转运图片</text>
</view>
<view class="image-grid" v-if="pallet&&pallet.files">
<view class="image-item" v-for="(img, index) in pallet.files" :key="index">
<image :src="img" mode="aspectFill" @click="prviewImage(index)" class="image"></image>
</view>
</view>
</view>
<!-- 零散物资信息 -->
<!-- <view class="section">
<view class="section-header">
<text class="section-title">零散物资信息</text>
</view>
<view class="info-card" v-if="pallet&&pallet.other">
<view class="info-row">
<text class="label">物资名称:</text>
<text class="value">螺丝钉</text>
</view>
<view class="info-row">
<text class="value">{{pallet.other}}</text>
</view>
</view>
</view> -->
</scroll-view>
</view>
</template>
<script>
export default {
props: {
palletAll: {
type: Object,
default: function () {
return {
};
}
}
},
data() {
return {
depts:[],
dicts:[],
status:[],
palletStatus:[],
pallet:{},
expandedIndex:null,
}
},
mounted() {
this._initDetail();
this.getTypes();
},
watch: {
palletAll(data) {
this._initDetail(data);
},
deep: true, // 深度监听
immediate: true, // 初次监听即执行
},
methods: {
gotocxDetail(instno,project){
uni.navigateTo({
url: `/pages/pallet/tpcxtk?instno=${instno}&project=${project}`
});
},
_initDetail(palletAll = this.palletAll) {
this.pallet=palletAll;
// 加载详情
this.openPalletDetail();
},
// 获取托盘详情
async openPalletDetail() {
if(this.pallet.palletNo){
uni.showLoading({
title: '数据加载中...'
});
const {data: res} = await uni.$http.get('/getInstdetail',{ // /getPalletAll
palletNo: this.pallet.palletNo
});
if(res.success){
if(res.data)
{
this.pallet["instdetailList"]=res.data;
// this.pallet["instdetailList"]=[{
// "id": "b0ce28eb-cf71-466f-952f-17b7663c29f2",
// "project": "T300K-106",
// "instno": "9201FP12010MV",
// "dwgno": "9201MP12MVM",
// "section": "9201",
// "assemcode": "40-CW02-L3S-05",
// "spec": "21.3*2.11",
// "grd": "A312 TP316",
// "qty": "1.000000",
// "weight": "0.6500",
// "treatment": "钝化",
// "status": "配送出库",
// "statusDate": "2026/01/07",
// "manuDept": "九作业区",
// "treatDept": "永合机电",
// "deliverDept": "集配组",
// "palletNo": "",
// "deliveryCar": "284",
// "deliveryDate": "2026/01/07",
// "deliveryRemark": "协商 (刘文禄 2026/01/06)",
// "requireDate": "2026/01/05",
// "requireDepartCode": "P30000",
// "requireAddress": "分段二部装焊厂房(钢加配送)",
// "requireName": "郝名远",
// "requirePhone": "13500795290",
// "groupDesc": "T300K-106 9201FP12010MV",
// "uniStr": "T300K-106 9201FP12010MV 40-CW02-L3S-05\n21.3*2.11 A312 TP316 1.000000"
// }]
this.$forceUpdate();
}
}
}
},
toggleDetail(index) {
if (this.expandedIndex === index) {
this.expandedIndex = null;
} else {
this.expandedIndex = index;
}
},
getTypes() {
//获取数据字典
this.gcs=[];
this.status=[];
var commondata = uni.getStorageSync("commondata");
if(commondata){
var data = JSON.parse(commondata);
if(data){
this.dicts=data.dicts;
this.depts=data.depts;
this.dicts.forEach(cell=>{
// console.log(cell.bmlb)
if("TPZT"==cell.bmlb){
// 托盘转运状态
this.status.push(cell);
}
if("SYZT"==cell.bmlb){
// 托盘转运状态
this.palletStatus.push(cell);
}
});
this.$forceUpdate();
}
}
else{
this.dicts=[];
this.depts=[];
this.status=[];
}
},
retType(type,str) {
var rets = '';
if(str==1){
// 状态
this.status.forEach((cell,idx)=>{
if(type==cell.bm){
rets=cell.bmsm;
return;
}
});
}
else if(str==3){
// 使用状态
this.palletStatus.forEach((cell,idx)=>{
if(type==cell.bm){
rets=cell.bmsm;
return;
}
});
}
else if(str==2){
// 部门
this.depts.forEach((cell,idx)=>{
if(type==cell.departCode){
rets=cell.departName;
return;
}
});
}
if(!rets){
rets=type
}
return rets;
},
getStatusClass(status) {
switch (status) {
case '表面接收':
return 'status-waiting';
case '建立任务':
return 'status-delivered';
case '内表面接收':
return 'status-receivedf';
case '配盘完工':
return 'status-received';
case '配送出库':
return 'status-outbound';
case '完工转运':
return 'status-complete';
default:
return 'status-default';
}
},
prviewImage(index) {
if(this.pallet&&this.pallet.files){
uni.previewImage({
urls: this.pallet.files,
current: index
});
}
},
}
}
</script>
<style lang="scss" scoped>
.container {
height: 100%;
background-color: #f5f5f5;
}
.navbar {
display: flex;
align-items: center;
height: 88rpx;
background-color: #fff;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
}
.nav-left,
.nav-right {
width: 60rpx;
display: flex;
align-items: center;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 34rpx;
font-weight: bold;
color: #333;
}
.content {
height: calc(100%);
padding: 0;
box-sizing: border-box;
}
.section {
background-color: #fff;
border-radius: 16rpx;
margin-bottom: 20rpx;
overflow: hidden;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
}
.section-header {
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.info-card {
padding: 30rpx;
}
.info-row {
display: flex;
margin-bottom: 20rpx;
}
.info-row:last-child {
margin-bottom: 0;
}
.label {
width: 200rpx;
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
.value {
flex: 1;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}
.status-used {
color: #ff6b35;
}
.status-transit {
color: #4a90e2;
}
.list-container {
padding: 0 30rpx 30rpx;
}
.list-item {
border: 1rpx solid #eee;
border-radius: 12rpx;
margin-top: 20rpx;
overflow: hidden;
}
.item-header {
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx 30rpx;
background-color: #f9f9f9;
}
.item-header-tip {
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx 20rpx 0;
background-color: #f9f9f9;
}
.item-tip{
display: flex;
flex: 1;
font-size: 30rpx;
font-weight: bold;
color: #007aff;
padding: 12rpx;
border-radius: 10rpx;
border: 1rpx solid #007aff;
}
.item-title {
display: flex;
flex: 1;
font-size: 30rpx;
font-weight: bold;
color: #333;
}
.item-content {
padding: 20rpx 30rpx;
}
.detail-row {
display: flex;
margin-bottom: 15rpx;
}
.detail-row:last-child {
margin-bottom: 0;
}
.image-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
padding: 30rpx;
}
.image-item {
border-radius: 12rpx;
overflow: hidden;
aspect-ratio: 1;
}
.image {
width: 100%;
height: 100%;
}
.status-badge {
padding: 6rpx 12rpx;
border-radius: 10rpx;
font-size: 24rpx;
color: #fff;
display: flex;
align-items: center;
margin-right: 10rpx;
}
.status-waiting {
background-color: #faad14;
}
.status-delivered {
background-color: #1890ff;
}
.status-receivedf {
background-color: #52c41a;
}
.status-received {
background-color: #18b566;
}
.status-outbound {
background-color: #fca600;
}
.status-complete {
background-color: #c191e8;
}
.status-default {
background-color: #f5f5f5;
color: #666666;
}
</style>

@ -0,0 +1,338 @@
<template>
<view>
<view class="scan-container" v-show="showSM" @tap="closeScan">
<video id="video-node" ref="videoNode" style="position: absolute; left: -9999px; width: 100px; height: 100px;"
muted autoplay playsinline="true" webkit-playsinline="true"></video>
<view class="display-wrapper">
<canvas canvas-id="displayCanvas" id="displayCanvas" class="display-canvas"></canvas>
<view class="scan-mask">
<view class="scan-box">
<view class="line"></view>
<view class="corner top-left"></view>
<view class="corner top-right"></view>
<view class="corner bottom-left"></view>
<view class="corner bottom-right"></view>
</view>
<view class="tip" v-if="isScanning">正在扫描二维码...</view>
<button v-else class="start-btn" @tap="initScanner">点击开启摄像头</button>
</view>
</view>
<view class="bottom-bar">
<button class="action-btn" @tap="closeScan">返回</button>
</view>
</view>
</view>
</template>
<script>
// 请确保已安装 jsQR: npm install jsqr
import jsQR from 'jsqr';
export default {
data() {
return {
showSM: false,
videoElement: null,
canvasContext: null,
isScanning: false,
videoStream: null,
timer: null
};
},
onReady() {
// 页面准备好后先尝试初始化,如果被浏览器拦截,用户点击按钮可再次触发
// this.initScanner();
},
methods: {
/**
* 初始化扫描器
*/
async initScanner() {
if (this.isScanning) return;
try {
// 1. 获取原生 DOM 节点
// 在 UniApp H5 中,通过 document.querySelector 寻找原生 video 标签最稳妥
const video = document.querySelector('#video-node video') || document.getElementById('video-node');
this.videoElement = video;
if (!this.videoElement || typeof this.videoElement.play !== 'function') {
// 针对部分 UniApp 渲染差异的兼容处理
this.videoElement = video.getElementsByTagName('video')[0] || video;
}
// 2. 获取摄像头权限
const stream = await navigator.mediaDevices.getUserMedia({
video: {
facingMode: "environment", // 优先后置
width: {
ideal: 750
},
height: {
ideal: 1280
}
}
});
this.videoStream = stream;
this.videoElement.srcObject = stream;
// 3. 确保视频播放
await this.videoElement.play();
// 4. 初始化绘图上下文
this.canvasContext = document.createElement('canvas').getContext('2d', {
willReadFrequently: true
});
this.isScanning = true;
this.renderLoop();
console.log("摄像头启动成功");
} catch (err) {
console.error("启动失败详情:", err);
uni.showToast({
title: '请在HTTPS环境下点击开启',
icon: 'none',
duration: 3000
});
}
},
/**
* 渲染与解码主循环
*/
renderLoop() {
if (!this.isScanning) return;
// HAVE_ENOUGH_DATA 表示视频帧已就绪
if (this.videoElement.readyState === this.videoElement.HAVE_ENOUGH_DATA) {
const vw = this.videoElement.videoWidth;
const vh = this.videoElement.videoHeight;
// 绘制到可见的 Canvas 上
this.drawToDisplay(vw, vh);
// 执行解码
this.decode(vw, vh);
}
// 使用 requestAnimationFrame 保持 60fps 渲染
this.timer = requestAnimationFrame(this.renderLoop);
},
/**
* 绘制可见画面
*/
drawToDisplay(vw, vh) {
const canvas = document.querySelector('#displayCanvas canvas');
if (!canvas) return;
const ctx = canvas.getContext('2d');
const dpr = window.devicePixelRatio || 1;
const screenW = window.innerWidth;
const screenH = window.innerHeight;
canvas.width = screenW * dpr;
canvas.height = screenH * dpr;
// 计算 Object-Fit: Cover
const scale = Math.max(canvas.width / vw, canvas.height / vh);
const x = (canvas.width / 1.5) - (vw / 1.5) * scale;
const y = (canvas.height / 1.5) - (vh / 1.5) * scale;
ctx.drawImage(this.videoElement, x, y, vw * scale, vh * scale);
},
/**
* jsQR 识别逻辑
*/
decode(vw, vh) {
// 降低解码频率可提升低端机性能,这里我们全速运行,若卡顿可加计数器
this.canvasContext.canvas.width = vw;
this.canvasContext.canvas.height = vh;
this.canvasContext.drawImage(this.videoElement, 0, 0, vw, vh);
const imageData = this.canvasContext.getImageData(0, 0, vw, vh);
const code = jsQR(imageData.data, imageData.width, imageData.height, {
inversionAttempts: "dontInvert",
});
// console.log(code,"aaa");
if (code && code.data) {
this.stopScanning();
this.handleSuccess(code.data);
}
},
handleSuccess(result) {
uni.vibrateShort();
uni.showModal({
title: '扫码结果',
content: result,
confirmText: '确定',
showCancel: false,
success: () => {
this.$emit('scanSuccess', result);
this.showSM = false;
this.stopScanning();
// uni.navigateBack();
}
});
},
stopScanning() {
this.isScanning = false;
if (this.timer) cancelAnimationFrame(this.timer);
if (this.videoStream) {
this.videoStream.getTracks().forEach(track => track.stop());
}
},
showScan() {
this.showSM = true;
// 开始扫码
this.initScanner();
},
closeScan() {
this.showSM = false;
this.stopScanning();
// uni.navigateBack();
}
},
beforeDestroy() {
this.stopScanning();
}
};
</script>
<style scoped>
.scan-container {
position: fixed;
inset: 0;
background: #000;
z-index: 999;
}
.display-wrapper {
position: relative;
width: 100vw;
height: 100vh;
}
.display-canvas {
width: 100%;
height: 100%;
}
/* 装饰层 */
.scan-mask {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.4);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.scan-box {
position: relative;
width: 480rpx;
height: 480rpx;
box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.4);
/* 形成中间镂空感 */
background: transparent;
}
.corner {
position: absolute;
width: 30rpx;
height: 30rpx;
border: 6rpx solid #007aff;
}
.top-left {
top: 0;
left: 0;
border-right: none;
border-bottom: none;
}
.top-right {
top: 0;
right: 0;
border-left: none;
border-bottom: none;
}
.bottom-left {
bottom: 0;
left: 0;
border-right: none;
border-top: none;
}
.bottom-right {
bottom: 0;
right: 0;
border-left: none;
border-top: none;
}
.line {
position: absolute;
width: 100%;
height: 2px;
background: linear-gradient(to right, transparent, #007aff, transparent);
animation: scanMove 2s infinite linear;
}
@keyframes scanMove {
0% {
top: 0;
}
100% {
top: 100%;
}
}
.tip {
margin-top: 80rpx;
color: #fff;
font-size: 28rpx;
}
.start-btn {
margin-top: 80rpx;
background: #007aff;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
padding: 0 40rpx;
}
.bottom-bar {
position: absolute;
bottom: 100rpx;
width: 100%;
display: flex;
justify-content: center;
}
.action-btn {
background: rgba(255, 255, 255, 0.2);
color: #fff;
border: 1px solid #fff;
font-size: 26rpx;
border-radius: 40rpx;
}
</style>

@ -0,0 +1,312 @@
<template>
<view>
<!-- 弹框 -->
<uni-popup ref="share" type="share">
<view class="allcon">
<view class="xcon">
<view class="xcell" :class="cur==1?'cur':''" @click="qhclick(1)">本单位</view>
<view class="xcell" :class="cur==2?'cur':''" @click="qhclick(2)">其他单位</view>
</view>
<view class="hcon">
<view class="htitle">
<u-search class="searchinput" v-model="searchKey" @change="searchchange" @custom="searchcustom" placeholder="请输入地址查询"
shape="square" bg-color="#EFF4F9" :clearabled="true" :show-action="showAction" input-align="left" @clear="clear"></u-search>
</view>
<view class="rclose" @tap="_cancel">取消</view>
</view>
<view class="selcon">
<radio-group class="checklist-group" @change="chagne">
<view class="sitem" v-for="(item,index) in clistnow" :key="index">
<view class="conright">
<view class="sname">
{{retType(item.departCode,2)}}
</view>
<view class="adress">
{{item.workshop}}
</view>
<view v-if="cur==2" class="adress">
{{item.location}}
</view>
<view v-if="cur==2" class="adress">
{{item.address}}
</view>
</view>
<view class="selbtn">
<radio :value="item.id" :checked="item.isChecked" />
</view>
</view>
</radio-group>
<view class="lineb"></view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
props: {
value: {
type: String,
default: "",
},
clist:{
type:Array,
default:[],
}
},
data() {
return {
cur:1,
clistnow:[],
clistall:[],
depts:[],
searchKey:"",
showAction:false,
};
},
watch: {
clist(list) {
console.log('监视值的改变1');
this._initTree(list);
},
deep: true, // 深度监听
immediate: true, // 初次监听即执行
},
created(){
this.getTypes();
},
methods: {
qhclick(index){
this.cur=index;
this.$forceUpdate();
this._initTree(this.clist);
},
searchchange(value) {
// 搜索框内容变化时,会触发此事件,value值为输入框的内容
if(value){
this.showAction=true;
this.$forceUpdate();
}
},
searchcustom(value) {
if (this.searchKey) {
this.clistall.forEach((v, i) => {
this.clistall[i].isChecked = false;
});
this.clistnow = this.clistall.filter((p) => {
//filter过滤的意思,这个是过滤函数,将每一项符合结果的值返回到personList
return ( p.address.indexOf(this.searchKey) !== -1 );
});
this.$forceUpdate();
}
},
clear() {
this.showAction=false;
this.clistnow=[];
this.clistall.forEach((v, i) => {
this.clistall[i].isChecked = false;
this.clistnow.push(this.clistall[i]);
});
},
_initTree(list){
this.clistall=list;
this.clistnow=[];
var user = JSON.parse(uni.getStorageSync("user"));
var bmbm = user.bmbm?user.bmbm:''; // '02'; //
this.clistall.forEach((v, i) => {
if(this.cur==1){
// 本单位
if(v.departCode==bmbm){
if(this.value == v.id){
this.clistall[i].isChecked = true;
}
else{
this.clistall[i].isChecked = false;
}
this.clistnow.push(this.clistall[i]);
}
}
else{
// 其他单位
if(v.departCode!==bmbm&&v.departCode!=='02'){
if(this.value == v.id){
this.clistall[i].isChecked = true;
}
else{
this.clistall[i].isChecked = false;
}
this.clistnow.push(this.clistall[i]);
}
}
});
// console.log(this.clistall,this.clistnow)
this.$forceUpdate();
},
chagne(e){
var rt= null;
if(e.detail.value){
this.clist.forEach(cell=>{
if(cell.id==e.detail.value){
rt=cell;
}
});
}
this.$emit("change", rt);
this._hide();
},
_show(id) {
this._initTree(this.clist);
this.$refs.share.open();
this.value=id;
this.clistnow.forEach(cell=>{
if(this.value == cell.id){
cell.isChecked=true;
}
else{
cell.isChecked=false;
}
});
this.$forceUpdate();
},
_hide() {
this.$refs.share.close();
},
_cancel() {
this._hide();
this.$emit("cancel", "");
},
getTypes() {
//获取数据字典
var commondata = uni.getStorageSync("commondata");
if(commondata){
var data = JSON.parse(commondata);
if(data){
this.depts=data.depts;
this.$forceUpdate();
}
}
},
retType(type,str) {
var rets = '';
if(str==2){
// 部门
this.depts.forEach((cell,idx)=>{
if(type==cell.departCode){
rets=cell.departName;
return;
}
});
}
if(!rets){
rets=type
}
return rets;
},
}
}
</script>
<style lang="scss" scoped>
::v-deep.uni-radio-input-checked::before{
display: none!important;
}
.allcon{
height: calc((0.8*100vh));
min-height: 300rpx;
overflow: hidden;
background-color: #FFFFFF;
}
.xcon{
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx 20rpx 0 20rpx;
.xcell{
border: 1rpx solid #ddd;
color: #949494;
margin-right: 20rpx;
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
.xcell.cur{
color: #007aff;
border: 1rpx solid #007aff;
}
}
.hcon{
display: flex;
flex-direction: row;
padding: 20rpx;
.htitle{
flex:1;
justify-content: flex-start;
font-size: 32rpx;
font-weight: 600;
letter-spacing: 5rpx;
padding-right: 20rpx;
}
.rclose{
width: 70rpx;
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 28rpx;
color:#949494;
}
}
.checklist-group{
width: 100%;
}
.selcon{
padding: 20rpx;
position: relative;
display: block;
overflow-y: auto;
height: calc((100vh*0.9 - 280rpx));
.lineb{
height: 50rpx;
}
.sitem {
display: flex;
flex-direction: row;
flex: 1;
background-color: #FFFFFF;
border-bottom: 1rpx solid #eeeeee;
padding: 10rpx 0;
.conright{
flex: 1;
display: flex;
flex-direction: row;
width: 100%;
justify-content:flex-start;
}
.selbtn{
width: 80rpx;
display: flex;
justify-content: center;
align-items: center;
}
.sname{
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 28rpx;
font-weight: 600;
color: rgb(29, 29, 29);
padding: 10rpx 10rpx 10rpx 0;
}
.adress{
display: flex;
justify-content: flex-start;
align-items: center;
padding: 10rpx 10rpx 10rpx 10rpx;
font-size: 26rpx;
color:#949494;
}
}
}
</style>

@ -0,0 +1,227 @@
<template>
<view>
<!-- 弹框 -->
<uni-popup ref="share" type="share">
<view class="allcon">
<view class="hcon">
<view class="htitle">
<u-search class="searchinput" v-model="searchKey" @change="searchchange" @custom="searchcustom" placeholder="请输入人员名称查询"
shape="square" bg-color="#EFF4F9" :clearabled="true" :show-action="showAction" input-align="left" @clear="clear"></u-search>
</view>
<view class="rclose" @tap="_cancel">取消</view>
</view>
<view class="selcon">
<radio-group class="checklist-group" @change="chagne">
<view class="sitem" v-for="(item,index) in clistnow" :key="index">
<view class="conright">
<view class="sname">
{{item.yhms}}
</view>
<view class="adress">
{{item.lxdh}}
</view>
</view>
<view class="selbtn">
<radio :value="item.yhdm" :checked="item.isChecked" />
</view>
</view>
</radio-group>
<view class="lineb"></view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
props: {
value: {
type: String,
default: "",
},
clist:{
type:Array,
default:[],
}
},
data() {
return {
clistnow:[],
clistall:[],
searchKey:"",
showAction:false,
};
},
watch: {
clist(list) {
console.log('监视值的改变1');
this._initTree(list);
},
deep: true, // 深度监听
immediate: true, // 初次监听即执行
},
methods: {
searchchange(value) {
// 搜索框内容变化时,会触发此事件,value值为输入框的内容
if(value){
this.showAction=true;
this.$forceUpdate();
}
},
searchcustom(value) {
if (this.searchKey) {
this.clistall.forEach((v, i) => {
this.clistall[i].isChecked = false;
});
this.clistnow = this.clistall.filter((p) => {
//filter过滤的意思,这个是过滤函数,将每一项符合结果的值返回到personList
return ( p.yhms.indexOf(this.searchKey) !== -1 );
});
this.$forceUpdate();
}
},
clear() {
this.showAction=false;
this.clistnow=[];
this.clistall.forEach((v, i) => {
this.clistall[i].isChecked = false;
this.clistnow.push(this.clistall[i]);
});
},
_initTree(list){
this.clistall=list;
this.clistnow=[];
this.clistall.forEach((v, i) => {
if(this.value == v.yhdm){
this.clistall[i].isChecked = true;
}
else{
this.clistall[i].isChecked = false;
}
this.clistnow.push(this.clistall[i]);
});
this.$forceUpdate();
},
chagne(e){
var rt= null;
if(e.detail.value){
this.clist.forEach(cell=>{
if(cell.yhdm==e.detail.value){
rt=cell;
}
});
}
this.$emit("change", rt);
this._hide();
},
_show(id) {
this._initTree(this.clist);
this.$refs.share.open();
this.value=id;
this.clistnow.forEach(cell=>{
if(this.value == cell.yhdm){
cell.isChecked=true;
}
else{
cell.isChecked=false;
}
});
this.$forceUpdate();
},
_hide() {
this.$refs.share.close();
},
_cancel() {
this._hide();
this.$emit("cancel", "");
}
}
}
</script>
<style lang="scss" scoped>
::v-deep.uni-radio-input-checked::before{
display: none!important;
}
.allcon{
height: calc((0.8*100vh));
min-height: 300rpx;
overflow: hidden;
background-color: #FFFFFF;
}
.hcon{
display: flex;
flex-direction: row;
padding: 20rpx;
.htitle{
flex:1;
justify-content: flex-start;
font-size: 32rpx;
font-weight: 600;
letter-spacing: 5rpx;
padding-right: 20rpx;
}
.rclose{
width: 70rpx;
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 28rpx;
color:#949494;
}
}
.checklist-group{
width: 100%;
}
.selcon{
padding: 20rpx;
position: relative;
display: block;
overflow-y: auto;
height: calc((100vh*0.9 - 230rpx));
.lineb{
height: 50rpx;
}
.sitem {
display: flex;
flex-direction: row;
flex: 1;
background-color: #FFFFFF;
border-bottom: 1rpx solid #eeeeee;
padding: 10rpx 0;
.conright{
flex: 1;
display: flex;
flex-direction: row;
width: 100%;
justify-content:flex-start;
}
.selbtn{
width: 80rpx;
display: flex;
justify-content: center;
align-items: center;
}
.sname{
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 28rpx;
font-weight: 600;
color: rgb(29, 29, 29);
padding: 10rpx 10rpx 10rpx 0;
}
.adress{
display: flex;
justify-content: flex-start;
align-items: center;
padding: 10rpx 10rpx 10rpx 10rpx;
font-size: 26rpx;
color:#949494;
}
}
}
</style>

@ -0,0 +1,327 @@
<template>
<view>
<!-- 弹框 -->
<uni-popup ref="share" type="share">
<view class="allcon">
<view class="xcon">
<view class="xcell" :class="cur==1?'cur':''" @click="qhclick(1)">常用地址</view>
<view class="xcell" :class="cur==2?'cur':''" @click="qhclick(2)">全部地址</view>
</view>
<view class="hcon">
<view class="htitle">
<u-search class="searchinput" v-model="searchKey" @change="searchchange" @custom="searchcustom" placeholder="请输入地址查询"
shape="square" bg-color="#EFF4F9" :clearabled="true" :show-action="showAction" input-align="left" @clear="clear"></u-search>
</view>
<view class="rclose" @tap="_cancel">取消</view>
</view>
<view class="selcon">
<radio-group class="checklist-group" @change="chagne">
<view class="sitem" v-for="(item,index) in clistnow" :key="index">
<view class="conright">
<view class="sname">
{{retType(item.departCode,2)}}
</view>
<view class="adress">
{{item.workshop}}
</view>
<view v-if="cur==1" class="adress">
{{item.location}}
</view>
<view v-if="cur==1" class="adress">
{{item.address}}
</view>
</view>
<view class="selbtn">
<radio :value="item.id" :checked="item.isChecked" />
</view>
</view>
</radio-group>
<view class="lineb"></view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
props: {
value: {
type: String,
default: "",
},
fcur: {
type: Number,
default: 1,
},
clist:{
type:Array,
default:[],
}
},
data() {
return {
cur:1,
clistnow:[],
clistall:[],
depts:[],
searchKey:"",
showAction:false,
};
},
watch: {
clist(list) {
console.log('监视值的改变1');
this._initTree(list);
},
fcur(v) {
console.log('监视值的改变2');
this.cur=v;
},
deep: true, // 深度监听
immediate: true, // 初次监听即执行
},
created(){
this.getTypes();
},
methods: {
qhclick(index){
this.cur=index;
this.$forceUpdate();
this._initTree(this.clist);
},
searchchange(value) {
// 搜索框内容变化时,会触发此事件,value值为输入框的内容
if(value){
this.showAction=true;
this.$forceUpdate();
}
},
searchcustom(value) {
if (this.searchKey) {
this.clistall.forEach((v, i) => {
this.clistall[i].isChecked = false;
});
this.clistnow = this.clistall.filter((p) => {
//filter过滤的意思,这个是过滤函数,将每一项符合结果的值返回到personList
return ( p.address.indexOf(this.searchKey) !== -1 );
});
this.$forceUpdate();
}
},
clear() {
this.showAction=false;
this.clistnow=[];
this.clistall.forEach((v, i) => {
this.clistall[i].isChecked = false;
this.clistnow.push(this.clistall[i]);
});
},
_initTree(list){
this.clistall=list;
this.clistnow=[];
this.clistall.forEach((v, i) => {
if(this.cur==2){
// 全部地址
var findx = this.clistnow.findIndex(item => item.departCode === v.departCode && item.workshop === v.workshop);
if(findx<0){
// 新增
var add={
id:v.id,
departCode:v.departCode,
workshop:v.workshop
}
if(this.value == v.id){
add.isChecked = true;
}
else{
add.isChecked = false;
}
this.clistnow.push(add);
}
}
else{
// 常用地址
if(this.value == v.id){
this.clistall[i].isChecked = true;
}
else{
this.clistall[i].isChecked = false;
}
this.clistnow.push(this.clistall[i]);
}
});
console.log(this.clistnow);
this.$forceUpdate();
},
chagne(e){
var rt= null;
if(e.detail.value){
this.clist.forEach(cell=>{
if(cell.id==e.detail.value){
rt=cell;
}
});
}
if(this.cur==2){
rt.location="";
rt.address="";
}
this.$emit("change", rt);
this._hide();
},
_show(id) {
this.cur=this.fcur;
this._initTree(this.clist);
this.$refs.share.open();
this.value=id;
this.clistnow.forEach(cell=>{
if(this.value == cell.id){
cell.isChecked=true;
}
else{
cell.isChecked=false;
}
});
this.$forceUpdate();
},
_hide() {
this.$refs.share.close();
},
_cancel() {
this._hide();
this.$emit("cancel", "");
},
getTypes() {
//获取数据字典
var commondata = uni.getStorageSync("commondata");
if(commondata){
var data = JSON.parse(commondata);
if(data){
this.depts=data.depts;
this.$forceUpdate();
}
}
},
retType(type,str) {
var rets = '';
if(str==2){
// 部门
this.depts.forEach((cell,idx)=>{
if(type==cell.departCode){
rets=cell.departName;
return;
}
});
}
if(!rets){
rets=type
}
return rets;
},
}
}
</script>
<style lang="scss" scoped>
::v-deep.uni-radio-input-checked::before{
display: none!important;
}
.allcon{
height: calc((0.8*100vh));
min-height: 300rpx;
overflow: hidden;
background-color: #FFFFFF;
}
.xcon{
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx 20rpx 0 20rpx;
.xcell{
border: 1rpx solid #ddd;
color: #949494;
margin-right: 20rpx;
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
.xcell.cur{
color: #007aff;
border: 1rpx solid #007aff;
}
}
.hcon{
display: flex;
flex-direction: row;
padding: 20rpx;
.htitle{
flex:1;
justify-content: flex-start;
font-size: 32rpx;
font-weight: 600;
letter-spacing: 5rpx;
padding-right: 20rpx;
}
.rclose{
width: 70rpx;
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 28rpx;
color:#949494;
}
}
.checklist-group{
width: 100%;
}
.selcon{
padding: 20rpx;
position: relative;
display: block;
overflow-y: auto;
height: calc((100vh*0.9 - 280rpx));
.lineb{
height: 50rpx;
}
.sitem {
display: flex;
flex-direction: row;
flex: 1;
background-color: #FFFFFF;
border-bottom: 1rpx solid #eeeeee;
padding: 10rpx 0;
.conright{
flex: 1;
display: flex;
flex-direction: row;
width: 100%;
justify-content:flex-start;
}
.selbtn{
width: 80rpx;
display: flex;
justify-content: center;
align-items: center;
}
.sname{
display: flex;
justify-content: flex-start;
align-items: center;
font-size: 28rpx;
font-weight: 600;
color: rgb(29, 29, 29);
padding: 10rpx 10rpx 10rpx 0;
}
.adress{
display: flex;
justify-content: flex-start;
align-items: center;
padding: 10rpx 10rpx 10rpx 10rpx;
font-size: 26rpx;
color:#949494;
}
}
}
</style>

@ -0,0 +1,318 @@
<template>
<view class="uni-combox">
<view class="uni-combox-dialog" v-if="isDialogInput && showSelector">
<view class="uni-combox-input">
<input
class="uni-combox__input"
type="text"
:placeholder="selectItem.value ? selectItem.value : placeholder"
v-model="inputVal"
@input="onInput"
@blur="onBlur"
:focus="'true'"
style="height: 90upx;"
/>
<uni-icons style="line-height: 90upx;" class="uni-combox__input-arrow" type="close" size="14" @click="clearSelector"></uni-icons>
<view class="uni-combox__selector">
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
<view class="uni-combox__selector-empty" v-if="isLoading"><text>数据加载...</text></view>
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0 && !isLoading">
<text>{{ emptyTips }}</text>
</view>
<view v-if="!isLoading" class="uni-combox__selector-item" v-for="(item, index) in filterCandidates" :key="index" @click="onSelectorClick(item)">
<text>{{ item.value }}</text>
</view>
</scroll-view>
</view>
</view>
</view>
<view v-if="label" class="uni-combox__label" :style="labelStyle">
<text>{{ label }}</text>
</view>
<view class="uni-combox__input-box">
<input
v-if="isDialogInput"
class="uni-combox__input"
type="text"
:placeholder="selectItem.value ? selectItem.value : placeholder"
v-model="inputVal"
@focus="onFocus"
/>
<input
v-else
class="uni-combox__input"
type="text"
:placeholder="selectItem.value ? selectItem.value : placeholder"
v-model="inputVal"
@focus="onFocus"
@input="onInput"
@blur="onBlur"
/>
<uni-icons v-if="!showSelector && !inputVal" class="uni-combox__input-arrow" type="arrowdown" size="14" @click="toggleSelector"></uni-icons>
<uni-icons v-else class="uni-combox__input-arrow" type="close" size="14" @click="clearSelector"></uni-icons>
<view class="uni-combox__selector" v-if="!isDialogInput && showSelector">
<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
<view class="uni-combox__selector-empty" v-if="isLoading"><text>数据加载...</text></view>
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0 && !isLoading">
<text>{{ emptyTips }}</text>
</view>
<view v-if="!isLoading" class="uni-combox__selector-item" v-for="(item, index) in filterCandidates" :key="index" @click="onSelectorClick(item)">
<text>{{ item.value }}</text>
</view>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
import uniIcons from '../uni-icons/uni-icons.vue';
/**
* Combox 组合输入框
* @description 组合输入框一般用于既可以输入也可以选择的场景
* @tutorial https://ext.dcloud.net.cn/plugin?id=1261
* @property {String} label 左侧文字
* @property {String} labelWidth 左侧内容宽度
* @property {String} placeholder 输入框占位符
* @property {Array} candidates 候选项列表
* @property {String} emptyTips 筛选结果为空时显示的文字
* @property {String} value 组合框的值
* @property {String} isDialogInput 弹出框输入和选择避免键盘遮挡
*/
export default {
name: 'uniCombox',
components: {
uniIcons
},
props: {
label: {
type: String,
default: ''
},
labelWidth: {
type: String,
default: 'auto'
},
placeholder: {
type: String,
default: ''
},
candidates: {
type: Array,
default() {
return [];
}
},
emptyTips: {
type: String,
default: '无匹配项'
},
value: {
type: String,
default: ''
},
isDialogInput: {
type: Boolean,
default: false
}
},
data() {
return {
showSelector: false,
inputVal: '',
isLoading: false,
showDowm: true,
selectItem: { key: '', value: '' }
};
},
computed: {
labelStyle() {
if (this.labelWidth === 'auto') {
return {};
}
return {
width: this.labelWidth
};
},
filterCandidates() {
return this.candidates.filter(item => {
return item;
});
},
filterCandidatesLength() {
return this.filterCandidates.length;
}
},
watch: {
value: {
handler(newVal) {
if(newVal) {
this.candidates.filter(item => {
if (this.value === item.key) {
this.selectItem = item;
this.inputVal = item.value;
}
});
}else {
this.selectItem = { key: '', value: '' }
this.inputVal = ''
}
},
immediate: true
},
candidates: {
handler(newVal) {
this.isLoading = false;
},
immediate: true
}
},
methods: {
toggleSelector() {
this.showSelector = !this.showSelector;
},
clearSelector() {
this.selectItem = { key: '', value: '' };
this.inputVal = '';
this.showSelector = false;
this.isLoading = false;
this.$emit('clear');
},
onFocus() {
this.showSelector = true;
if (this.inputVal) {
this.inputVal = '';
}
},
onBlur() {
setTimeout(() => {
if (this.selectItem.value) {
const selectItem = JSON.parse(JSON.stringify(this.selectItem));
this.inputVal = selectItem.value;
} else {
this.inputVal = '';
}
this.showSelector = false;
}, 50);
},
onSelectorClick(item) {
this.selectItem = item;
this.inputVal = item.value;
this.showSelector = false;
this.$emit('select', item.key, item);
},
onInput() {
setTimeout(() => {
if (this.inputVal) {
this.isLoading = true;
this.$emit('input', this.inputVal);
} else {
this.isLoading = false;
}
});
}
}
};
</script>
<style lang="scss" scoped>
.uni-combox {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
height: 40upx;
flex-direction: row;
align-items: center;
// border-bottom: solid 1px #DDDDDD;
}
.uni-combox__label {
font-size: 28upx;
line-height: 40upx;
padding-right: 10px;
color: #999999;
}
.uni-combox__input-box {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: row;
align-items: center;
}
.uni-combox__input {
flex: 1;
font-size: 28upx;
}
.uni-combox__input-arrow {
padding-left: 15upx;
padding-right: 15upx;
}
.uni-combox__selector {
box-sizing: border-box;
position: absolute;
top: 50px;
left: 0;
width: 100%;
background-color: #ffffff;
border-radius: 6px;
box-shadow: #dddddd 4px 4px 8px, #dddddd -4px -4px 8px;
z-index: 2;
}
.uni-combox__selector-scroll {
max-height: 350upx;
box-sizing: border-box;
}
.uni-combox__selector::before {
content: '';
position: absolute;
width: 0;
height: 0;
border-bottom: solid 6px #ffffff;
border-right: solid 6px transparent;
border-left: solid 6px transparent;
left: 50%;
top: -6px;
margin-left: -6px;
}
.uni-combox__selector-empty,
.uni-combox__selector-item {
/* #ifdef APP-NVUE */
display: flex;
/* #endif */
line-height: 70upx;
font-size: 28upx;
text-align: center;
border-bottom: solid 1px #dddddd;
margin: 0px 10px;
}
.uni-combox__selector-empty:last-child,
.uni-combox__selector-item:last-child {
border-bottom: none;
}
.uni-combox-dialog {
background: #cccccc7d;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 100;
}
.uni-combox-input {
background: #fff;
display: -webkit-box;
display: -webkit-flex;
display: flex;
height: 90upx;
}
</style>

@ -0,0 +1,447 @@
<template>
<view class="container">
<!-- 主内容区域 -->
<scroll-view class="content" scroll-y="true">
<!-- 装盘明细 -->
<view class="section">
<view class="section-header">
<text class="section-title">托盘明细({{pallet&&pallet.instdetailList?pallet.instdetailList.length:0}})</text>
</view>
<view class="list-container">
<view class="list-item">
<view class="item-header">
<text class="item-title">{{ item.assemcode }}</text>
<text class="status-badge" :class="getStatusClass(item.status)">{{item.status}}</text>
</view>
<view class="item-content">
<view class="detail-row">
<text class="label">工程编号:</text>
<text class="value">{{ item.project }}</text>
</view>
<view class="detail-row">
<text class="label">安装托盘表号:</text>
<text class="value">{{ item.instno }}</text>
</view>
<view class="detail-row">
<text class="label">制作图号:</text>
<text class="value">{{ item.dwgno }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">分段号:</text>
<text class="value">{{ item.section }}</text>
</view> -->
<view class="detail-row">
<text class="label">规格:</text>
<text class="value">{{ item.spec }}</text>
</view>
<view class="detail-row">
<text class="label">材质:</text>
<text class="value">{{ item.grd }}</text>
</view>
<view class="detail-row">
<text class="label">数量:</text>
<text class="value">{{ item.qty }}</text>
</view>
<view class="detail-row">
<text class="label">重量:</text>
<text class="value">{{ item.weight }}</text>
</view>
<view class="detail-row">
<text class="label">表面处理:</text>
<text class="value">{{ item.treatment }}</text>
</view>
<view class="detail-row">
<text class="label">涂装代码:</text>
<text class="value">{{ item.paintcode }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">状态日期:</text>
<text class="value">{{ item.statusDate }}</text>
</view> -->
<view class="detail-row">
<text class="label">制作单位:</text>
<text class="value">{{ item.manuDept }}</text>
</view>
<view class="detail-row">
<text class="label">处理单位:</text>
<text class="value">{{ item.treatDept }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">配送单位:</text>
<text class="value">{{ item.deliverDept }}</text>
</view> -->
<view class="detail-row">
<text class="label">工装托盘编号:</text>
<text class="value">{{ item.palletNo }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">配送单号:</text>
<text class="value">{{ item.deliveryNo }}</text>
</view> -->
<view class="detail-row">
<text class="label">配送车辆:</text>
<text class="value">{{ item.deliveryCar }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">配送日期:</text>
<text class="value">{{ item.deliveryDate }}</text>
</view>
<view class="detail-row">
<text class="label">配送备注:</text>
<text class="value">{{ item.deliveryRemark }}</text>
</view> -->
<view class="detail-row">
<text class="label">需求日期:</text>
<text class="value">{{ item.requireRate }}</text>
</view>
<view class="detail-row">
<text class="label">需求单位:</text>
<text class="value">{{ retType(item.requireDepartCode,2) }}</text>
</view>
<view class="detail-row">
<text class="label">配送地址:</text>
<text class="value">{{ item.requireAddress }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员:</text>
<text class="value">{{ item.requireName }}</text>
</view>
<view class="detail-row">
<text class="label">接收人员电话:</text>
<text class="value">{{ item.requirePhone }}</text>
</view>
<!-- <view class="detail-row">
<text class="label">实际接收日期:</text>
<text class="value">{{ item.receiveDate }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收人员:</text>
<text class="value">{{ item.receiveName }}</text>
</view>
<view class="detail-row">
<text class="label">实际接收备注:</text>
<text class="value">{{ item.receiveRemark }}</text>
</view> -->
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
<script>
export default {
props: {
pallet: {
type: Object,
default: function () {
return {};
}
}
},
data() {
return {
depts:[],
dicts:[],
status:[], // 状态
palletStatus:[], // 转运状态
item:[],
}
},
mounted() {
this._initDetail();
this.getTypes();
},
watch: {
pallet(data) {
this._initDetail(data);
},
deep: true, // 深度监听
immediate: true, // 初次监听即执行
},
methods: {
_initDetail(pallet = this.pallet) {
this.item=pallet;
},
getTypes() {
//获取数据字典
this.gcs=[];
this.status=[];
var commondata = uni.getStorageSync("commondata");
if(commondata){
var data = JSON.parse(commondata);
if(data){
this.dicts=data.dicts;
this.depts=data.depts;
this.dicts.forEach(cell=>{
// console.log(cell.bmlb)
if("TPZT"==cell.bmlb){
// 托盘转运状态
this.status.push(cell);
}
if("SYZT"==cell.bmlb){
// 托盘转运状态
this.palletStatus.push(cell);
}
});
this.$forceUpdate();
}
}
else{
this.dicts=[];
this.depts=[];
this.status=[];
}
},
retType(type,str) {
var rets = '';
if(str==1){
// 状态
this.status.forEach((cell,idx)=>{
if(type==cell.bm){
rets=cell.bmsm;
return;
}
});
}
else if(str==3){
// 使用状态
this.palletStatus.forEach((cell,idx)=>{
if(type==cell.bm){
rets=cell.bmsm;
return;
}
});
}
else if(str==2){
// 部门
this.depts.forEach((cell,idx)=>{
if(type==cell.departCode){
rets=cell.departName;
return;
}
});
}
if(!rets){
rets=type
}
return rets;
},
getStatusClass(status) {
switch (status) {
case '表面接收':
return 'status-waiting';
case '建立任务':
return 'status-delivered';
case '内表面接收':
return 'status-receivedf';
case '配盘完工':
return 'status-received';
case '配送出库':
return 'status-outbound';
case '完工转运':
return 'status-complete';
default:
return 'status-default';
}
},
}
}
</script>
<style lang="scss" scoped>
.container {
height: 100%;
background-color: #f5f5f5;
}
.navbar {
display: flex;
align-items: center;
height: 88rpx;
background-color: #fff;
padding: 0 30rpx;
box-sizing: border-box;
position: relative;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
}
.nav-left,
.nav-right {
width: 60rpx;
display: flex;
align-items: center;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 34rpx;
font-weight: bold;
color: #333;
}
.content {
height: calc(100%);
padding: 0;
box-sizing: border-box;
}
.section {
background-color: #fff;
border-radius: 16rpx;
margin-bottom: 20rpx;
overflow: hidden;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
}
.section-header {
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.info-card {
padding: 30rpx;
}
.info-row {
display: flex;
margin-bottom: 20rpx;
}
.info-row:last-child {
margin-bottom: 0;
}
.label {
width: 200rpx;
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
.value {
flex: 1;
font-size: 28rpx;
color: #333;
line-height: 1.5;
}
.status-used {
color: #ff6b35;
}
.status-transit {
color: #4a90e2;
}
.list-container {
padding: 0 30rpx 30rpx;
}
.list-item {
border: 1rpx solid #eee;
border-radius: 12rpx;
margin-bottom: 20rpx;
overflow: hidden;
}
.item-header {
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx 30rpx;
background-color: #f9f9f9;
}
.item-title {
display: flex;
flex: 1;
font-size: 30rpx;
font-weight: bold;
color: #333;
}
.item-content {
padding: 20rpx 30rpx;
}
.detail-row {
display: flex;
margin-bottom: 15rpx;
}
.detail-row:last-child {
margin-bottom: 0;
}
.image-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
padding: 30rpx;
}
.image-item {
border-radius: 12rpx;
overflow: hidden;
aspect-ratio: 1;
}
.image {
width: 100%;
height: 100%;
}
.status-badge {
padding: 6rpx 12rpx;
border-radius: 10rpx;
font-size: 24rpx;
color: #fff;
display: flex;
align-items: center;
margin-right: 10rpx;
}
.status-waiting {
background-color: #faad14;
}
.status-delivered {
background-color: #1890ff;
}
.status-receivedf {
background-color: #52c41a;
}
.status-received {
background-color: #18b566;
}
.status-outbound {
background-color: #fca600;
}
.status-complete {
background-color: #c191e8;
}
.status-default {
background-color: #f5f5f5;
color: #666666;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,3 @@
àRCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSEáCNS2-H

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save