Merge branch 'main-cq'

This commit is contained in:
FrancisHu 2024-04-25 11:21:03 +08:00
commit 8c7c7f40dd
19 changed files with 519 additions and 146 deletions

View File

@ -182,6 +182,14 @@ const fetchExam = {
header header
) )
}, },
async subExamCq (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.subExamCq,
data,
header
)
},
async rejectExam (data = {} , header = {}){ async rejectExam (data = {} , header = {}){
return await Http.post( return await Http.post(
HttpConfig.basePath, HttpConfig.basePath,
@ -190,6 +198,14 @@ const fetchExam = {
header header
) )
}, },
async rejectExamCq (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.rejectExamCq,
data,
header
)
},
async fetchExamListAll (data = {} , header = {}){ async fetchExamListAll (data = {} , header = {}){
return await Http.get( return await Http.get(
HttpConfig.basePath, HttpConfig.basePath,
@ -206,6 +222,14 @@ const fetchExam = {
header header
) )
}, },
async fetchTrueExamListCq (data = {} , header = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchTrueExamListCq,
data,
header
)
},
async fetchDetailList (data = {} , header = {}){ async fetchDetailList (data = {} , header = {}){
return await Http.get( return await Http.get(
HttpConfig.basePath, HttpConfig.basePath,

View File

@ -3,24 +3,24 @@ class HttpConfig {
baseUrl = "/api" baseUrl = "/api"
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
baseUrl = "http://112.29.103.165:21624" // baseUrl = "http://112.29.103.165:21624"
// baseUrl = "http://192.168.0.14:21624" baseUrl = "http://192.168.0.14:21624"
// baseUrl = "http://112.29.103.165:21626" // baseUrl = "http://112.29.103.165:21626"
// baseUrl = "http://172.20.10.3:8080" // baseUrl = "http://172.20.10.3:8080"
// baseUrl = "http://10.40.92.13:8080"
// baseUrl = "http://10.40.92.75:8080"
// baseUrl = "http://10.40.92.8:8080" // baseUrl = "http://10.40.92.8:8080"
// baseUrl = "http://10.40.92.52:28080"
// baseUrl = "http://10.40.92.81:8080"
// baseUrl = "https://z.csgmall.com.cn/gl" // baseUrl = "https://z.csgmall.com.cn/gl"
// #endif // #endif
// 基地址 // 基地址
/* authPath = `${this.baseUrl}/dev-api/auth` authPath = `${this.baseUrl}/dev-api/auth`
systemPath = `${this.baseUrl}/dev-api/system` systemPath = `${this.baseUrl}/dev-api/system`
basePath = `${this.baseUrl}/dev-api/base` basePath = `${this.baseUrl}/dev-api/base`
materialPath = `${this.baseUrl}/dev-api/material` */ materialPath = `${this.baseUrl}/dev-api/material`
authPath = `${this.baseUrl}/auth` /* authPath = `${this.baseUrl}/auth`
systemPath = `${this.baseUrl}/system` systemPath = `${this.baseUrl}/system`
basePath = `${this.baseUrl}/base` basePath = `${this.baseUrl}/base`
materialPath = `${this.baseUrl}/material` materialPath = `${this.baseUrl}/material` */
// 短链 // 短链
serviceUrl = { serviceUrl = {
login: { login: {
@ -54,9 +54,12 @@ class HttpConfig {
fetchExamList: '/tm_task/getLeaseAuditList', // 获取领料审批清单 fetchExamList: '/tm_task/getLeaseAuditList', // 获取领料审批清单
fetchExamListAll: '/tm_task/getLeaseAuditListAll', // 获取领料申请列表 fetchExamListAll: '/tm_task/getLeaseAuditListAll', // 获取领料申请列表
fetchTrueExamList: '/tm_task/getLeaseManageListAll', // 获取领料审批列表 fetchTrueExamList: '/tm_task/getLeaseManageListAll', // 获取领料审批列表
fetchTrueExamListCq: '/tm_task/getLeaseManageListAllCq', // 获取重庆领料审批列表
fetchDetailList: '/tm_task/getLeaseListAll', // 获取领料明细列表 fetchDetailList: '/tm_task/getLeaseListAll', // 获取领料明细列表
subExam: '/tm_task/auditLeaseByCompany', // 通过领料审批 subExam: '/tm_task/auditLeaseByCompany', // 通过领料审批
subExamCq: '/tm_task/auditLeaseByCompanyCq', // 通过重庆领料审批
rejectExam: '/tm_task/rejectLeaseByCompany', // 驳回领料审批 rejectExam: '/tm_task/rejectLeaseByCompany', // 驳回领料审批
rejectExamCq: '/tm_task/rejectLeaseByCompanyCq', // 驳回重庆领料审批
}, },
fetchMaterialOutStore: { fetchMaterialOutStore: {
fetchInfoByCode: '/leaseOutDetails/getMaMachineByCode', // 根据maId获取机具详情 fetchInfoByCode: '/leaseOutDetails/getMaMachineByCode', // 根据maId获取机具详情

View File

@ -340,7 +340,7 @@
"path" : "pages/moreNotice/moreNotice", "path" : "pages/moreNotice/moreNotice",
"style" : "style" :
{ {
"navigationBarTitleText": "更多公告" "navigationBarTitleText": "通知公告"
} }
} }

View File

@ -1,8 +1,8 @@
<template> <template>
<view> <view>
<!-- <view class="search-bar"> <view class="search-bar">
<uni-easyinput prefixIcon="search" v-model="exitIpt" placeholder="请输入退料人"></uni-easyinput> <uni-easyinput suffixIcon="search" v-model="exitIpt" placeholder="请输入关键字" @iconClick="searchKeyword"></uni-easyinput>
</view> --> </view>
<uni-swipe-action> <uni-swipe-action>
<uni-swipe-action-item <uni-swipe-action-item
:right-options="options" :right-options="options"
@ -234,37 +234,42 @@ import { basePath } from '../../public'
} }
} }
} }
},
getList (keyWord) {
let that = this
// 退
that.$api.backMaterialReceive.backMaterialReceiveList({
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
flag: 0,
keyWord
}).then(res => {
console.log(res);
if (res.data.code == 200) {
if (res.data.data.length == 0) {
uni.showToast({
icon: 'none',
title: '未查询到相关数据!'
})
} else {
that.fetchMaterialList = res.data.data
console.log("fetchMaterialList",that.fetchMaterialList)
}
} else {
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);
})
},
searchKeyword () {
this.getList(this.exitIpt)
} }
}, },
onShow() { onShow() {
let that = this this.getList('')
// console.log(uni.getStorageSync('userInfo').sysUser.companyId);
// 退
that.$api.backMaterialReceive.backMaterialReceiveList({
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
flag: 0
// companyId:'101'
}).then(res => {
console.log(res);
if (res.data.code == 200) {
if (res.data.data.length == 0) {
uni.showToast({
icon: 'none',
title: '未查询到相关数据!'
})
} else {
that.fetchMaterialList = res.data.data
console.log("fetchMaterialList",that.fetchMaterialList)
}
} else {
uni.showToast({
icon: 'none',
title: res.data.msg
})
}
}).catch(err => {
console.log(err);
})
} }
} }
</script> </script>
@ -277,7 +282,7 @@ import { basePath } from '../../public'
} }
.search-bar{ .search-bar{
width: 95%; width: 95%;
margin: 40rpx auto; margin: 20rpx auto;
} }
.single-fetch{ .single-fetch{
width: 95%; width: 95%;

View File

@ -136,7 +136,7 @@
} }
if (this.infoList.manageType == '0') { if (this.infoList.manageType == '0') {
this.$refs.popup1.open() this.$refs.popup1.open()
} else if (this.infoList.manageType == '1') { } else {
const userInfo = uni.getStorageSync('userInfo'); const userInfo = uni.getStorageSync('userInfo');
console.log("userInfo", userInfo) console.log("userInfo", userInfo)
const userId = userInfo.userid const userId = userInfo.userid
@ -271,9 +271,9 @@
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
for (let i = 0; i < res.data.data.length; i++) { /* for (let i = 0; i < res.data.data.length; i++) {
res.data.data[i].num = res.data.data[i].num.split('.')[0] res.data.data[i].num = res.data.data[i].num.split('.')[0]
} } */
that.fetchList = res.data.data that.fetchList = res.data.data
console.log(that.fetchList); console.log(that.fetchList);
} }

View File

@ -12,7 +12,7 @@
v-show="infoList.length != 0" v-show="infoList.length != 0"
> >
<view> <view>
<h4>物品名称</h4> <h4>机具分类</h4>
<span>{{ item.itemType }}</span> <span>{{ item.itemType }}</span>
</view> </view>
<view> <view>
@ -154,6 +154,7 @@
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-bottom: 1px solid #d7d7d7;
view{ view{
margin-bottom: 25rpx; margin-bottom: 25rpx;
display: flex; display: flex;
@ -169,6 +170,9 @@
} }
} }
} }
.info-area:last-child{
border-bottom: none;
}
.sub-btn{ .sub-btn{
width: 80%; width: 80%;
margin: 30rpx auto; margin: 30rpx auto;

View File

@ -15,6 +15,10 @@
</view> </view>
</view> </view>
<view class="fetch-lower"> <view class="fetch-lower">
<view>
<span>退料单号</span>
<h4>{{ fetch.code }}</h4>
</view>
<view> <view>
<span>退料申请单位</span> <span>退料申请单位</span>
<h4>{{ fetch.unitName }}</h4> <h4>{{ fetch.unitName }}</h4>
@ -140,7 +144,7 @@
</uni-icons> </uni-icons>
</view> </view>
<view class="select-area"> <view class="select-area">
<uni-easyinput v-model="rejectReason" placeholder="请填写驳回原因"></uni-easyinput> <uni-easyinput v-model="rejectReason" maxlength="50" placeholder="请填写驳回原因"></uni-easyinput>
<view class="btn" @click="confirmReject">驳回</view> <view class="btn" @click="confirmReject">驳回</view>
</view> </view>
</view> </view>

View File

@ -142,13 +142,13 @@ import { basePath } from '../../public';
finishCart () { finishCart () {
let that = this let that = this
that.cartList = that.list.filter((item) => { that.cartList = that.list.filter((item) => {
return item.checked == true return item.checked == true && item.offNum > 0
}) })
console.log(that.cartList); console.log(that.cartList);
if (that.cartList.length == 0) { if (that.cartList.length == 0) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '请选择退料项!' title: '请选择退料数量大于0的退料项!'
}) })
} else { } else {
uni.showModal({ uni.showModal({
@ -194,13 +194,22 @@ import { basePath } from '../../public';
}, },
exitNumChange (e, index) { exitNumChange (e, index) {
let that = this let that = this
console.log(e, index); let numTest = /^\+?[1-9]\d*$/
if (e.includes('.') || e.includes('-')) { console.log(e, that.list[index].num);
if (!numTest.test(e)) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '退料数量输入有误!', title: '退料数量输入有误!',
success: () => { success: () => {
that.list[index].offNum = 1 that.list[index].offNum = 0
}
})
} else if (e > that.list[index].num) {
uni.showToast({
icon: 'none',
title: '退料数量不得大于当前在用量!',
success: () => {
that.list[index].offNum = 0
} }
}) })
} }
@ -225,7 +234,7 @@ import { basePath } from '../../public';
} else { } else {
for (let i = 0; i < res.data.data.length; i++) { for (let i = 0; i < res.data.data.length; i++) {
res.data.data[i].num = Number(res.data.data[i].num.split('.')[0]) res.data.data[i].num = Number(res.data.data[i].num.split('.')[0])
res.data.data[i].offNum = 1 res.data.data[i].offNum = 0
} }
console.log(res); console.log(res);
that.list = res.data.data that.list = res.data.data

View File

@ -1,5 +1,13 @@
<template> <template>
<view> <view>
<view class="ipt-area">
<uni-easyinput
suffixIcon="search"
v-model="keywordVal"
placeholder="请输入关键字"
@iconClick="searchKeyword"
></uni-easyinput>
</view>
<view <view
class="single-fetch" class="single-fetch"
v-for="(fetch, index) in fetchMaterialList" v-for="(fetch, index) in fetchMaterialList"
@ -133,6 +141,7 @@ import { basePath } from '../../public'
export default { export default {
data() { data() {
return { return {
keywordVal: '',
showLoading: false, showLoading: false,
allChecked: false, allChecked: false,
fetchMaterialList: [ fetchMaterialList: [
@ -206,11 +215,12 @@ import { basePath } from '../../public'
that.$refs.popup.close() that.$refs.popup.close()
}) })
}, },
initFetch () { initFetch (code) {
let that = this let that = this
that.showLoading = true that.showLoading = true
// //
that.$api.fetchExam.fetchExamList({ that.$api.fetchExam.fetchExamList({
code,
role: uni.getStorageSync('roles').join(','), role: uni.getStorageSync('roles').join(','),
flag: 0 flag: 0
}).then(res => { }).then(res => {
@ -236,12 +246,15 @@ import { basePath } from '../../public'
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
}) })
},
searchKeyword () {
this.initFetch(this.keywordVal)
} }
}, },
onShow() { onShow() {
let that = this let that = this
console.log(uni.getStorageSync('roles').join(',')); console.log(uni.getStorageSync('roles').join(','));
that.initFetch() that.initFetch('')
} }
} }
</script> </script>
@ -252,6 +265,10 @@ import { basePath } from '../../public'
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 10vh; padding-bottom: 10vh;
} }
.ipt-area{
width: 95%;
margin: 20rpx auto;
}
.single-fetch{ .single-fetch{
width: 95%; width: 95%;
margin: 20rpx auto; margin: 20rpx auto;

View File

@ -150,7 +150,7 @@
} else { } else {
this.$refs.popup1.open() this.$refs.popup1.open()
} }
} else if (this.infoList.manageType == 1) { } else {
if (this.infoList.outNum == 0) { if (this.infoList.outNum == 0) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',

View File

@ -16,6 +16,7 @@
<text><span style="padding-right: 20rpx; color: #a6a6a6;">规格型号</span>{{item.specificationType}}</text> <text><span style="padding-right: 20rpx; color: #a6a6a6;">规格型号</span>{{item.specificationType}}</text>
<text><span style="padding-right: 20rpx; color: #a6a6a6;">待入库数量</span>{{item.checkNum}}</text> <text><span style="padding-right: 20rpx; color: #a6a6a6;">待入库数量</span>{{item.checkNum}}</text>
<text><span style="padding-right: 20rpx; color: #a6a6a6;">机具编号</span>{{item.maCode == null ? '无' : item.maCode}}</text> <text><span style="padding-right: 20rpx; color: #a6a6a6;">机具编号</span>{{item.maCode == null ? '无' : item.maCode}}</text>
<text><span style="padding-right: 20rpx; color: #a6a6a6;">机具状态</span>{{item.CNstatus}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -67,22 +68,32 @@
> >
<view class="popup"> <view class="popup">
<view class="pop-top"> <view class="pop-top">
<h4>入库</h4> <h4>审批</h4>
<uni-icons <uni-icons
style="color: #AAAAAA; font-weight: bold;" style="color: #AAAAAA; font-weight: bold;"
type="closeempty" type="closeempty"
size="32"
@click="closePopup" @click="closePopup"
> >
</uni-icons> </uni-icons>
</view> </view>
<h5 style="width: 85%; margin: 2vh auto; font-weight: normal; text-align: center;">请选择入库方式</h5> <h4 style="width: 85%; margin: 2vh auto; font-weight: normal; text-align: center;">是否通过审批</h4>
<view class="select-area"> <view class="select-area">
<uni-data-checkbox <view @click="modalConfirm">通过</view>
v-model="scanType" <view @click="modalReject">驳回</view>
:localdata="scanRange" <!-- <uni-forms ref="examForm" :modelValue="examFormData" :rules="rules" label-position="top">
@change="scanChange" <uni-forms-item name="ifPass" required label="是否通过" label-width="150">
></uni-data-checkbox> <uni-data-select
v-model="examFormData.ifPass"
:localdata="ifPassRange"
:clear="false"
@change="ifPassChange"
></uni-data-select>
</uni-forms-item>
<uni-forms-item required v-show="examFormData.ifPass == '1'" name="noPassReason" label="不通过原因" label-width="150">
<uni-easyinput type="textarea" v-model="examFormData.noPassReason" placeholder="请输入内容"></uni-easyinput>
</uni-forms-item>
<button class="submit-btn" @click="formSubmit">确认</button>
</uni-forms> -->
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
@ -145,17 +156,36 @@
}) })
} }
}, },
modalConfirm () {
this.subObj = {
taskId: this.taskId,
checkResult: '1',
inputRecordList: this.totalGoods
}
console.log(this.subObj)
this.subNewBuy(this.subObj)
},
modalReject () {
this.subObj = {
taskId: this.taskId,
checkResult: '2',
inputRecordList: this.totalGoods
}
console.log(this.subObj)
this.subNewBuy(this.subObj)
},
finishCart () { finishCart () {
let that = this let that = this
that.totalGoods = that.list.filter((item) => { that.totalGoods = that.list.filter(item => {
return item.checked == true return item.checked == true
}).map((subItem) => { }).map(subItem => {
return { return {
typeId: subItem['typeId'], typeId: subItem['typeId'],
maId: subItem['maId'], maId: subItem['maId'],
maCode: subItem['maCode'], maCode: subItem['maCode'],
inputNum: subItem['checkNum'], inputNum: subItem['checkNum'],
companyId: subItem['companyId'] companyId: subItem['companyId'],
manageType: subItem['manageType']
} }
}) })
if (that.totalGoods.length == 0) { if (that.totalGoods.length == 0) {
@ -164,7 +194,22 @@
title: '未选中审核项!' title: '未选中审核项!'
}) })
} else { } else {
uni.showModal({ that.totalGoods.forEach(item => {
console.log(item);
if (item.manageType == 0) {
if (item.maCode == null) {
uni.showToast({
icon: 'none',
title: '该机具编码未绑定,无法审核!'
})
} else {
that.openPopup()
}
} else {
that.openPopup()
}
})
/* uni.showModal({
title: '新购明细审核', title: '新购明细审核',
content: '是否确定审核通过?', content: '是否确定审核通过?',
confirmText: '通过', confirmText: '通过',
@ -179,17 +224,18 @@
} }
console.log(that.subObj); console.log(that.subObj);
that.subNewBuy(that.subObj) that.subNewBuy(that.subObj)
} /* else if (res.cancel) { } else if (res.cancel) {
// //
that.subObj = { that.subObj = {
taskId: that.taskId, taskId: that.taskId,
checkResult: '2', checkResult: '2',
inputRecordList: that.totalGoods inputRecordList: that.totalGoods
} }
that.subNewBuy(that.subObj) console.log(that.subObj);
} */ // that.subNewBuy(that.subObj)
}
} }
}) }) */
} }
}, },
bindCode () { bindCode () {
@ -239,6 +285,7 @@
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
success: () => { success: () => {
that.closePopup()
uni.navigateBack() uni.navigateBack()
} }
}) })
@ -267,6 +314,17 @@
if (res.data.data[i].status == '0') { if (res.data.data[i].status == '0') {
res.data.data[i].checked = false res.data.data[i].checked = false
} }
switch (res.data.data[i].status) {
case '1':
res.data.data[i].CNstatus = '已入库'
break;
case '2':
res.data.data[i].CNstatus = '入库驳回'
break;
case '0':
res.data.data[i].CNstatus = '待审核'
break;
}
} }
that.list = res.data.data that.list = res.data.data
} else { } else {
@ -495,8 +553,18 @@
.popup>.select-area{ .popup>.select-area{
width: 85%; width: 85%;
margin: 40rpx auto; margin: 40rpx auto;
.uni-data-checklist .checklist-group[data-v-84d5d996]{ display: flex;
justify-content: center; justify-content: space-around;
} align-items: center;
} }
.popup>.select-area>view{
box-sizing: border-box;
font-size: 30rpx;
padding: 12rpx 24rpx;
background-color: #3788FF;
color: #fff;
border-radius: 20rpx;
}
</style> </style>

View File

@ -67,9 +67,17 @@
</view> </view>
</view> --> </view> -->
<view class="sticky-area"> <view class="sticky-area">
<image src="/static/passed.png" v-show="fetch.taskStatus == '28'" mode=""></image> <h4
<!-- <image src="/static/noPass.png" v-show="fetch.taskStatus == '1'" mode=""></image> --> v-show="fetch.taskStatus == '26' || fetch.taskStatus == '105'"
<!-- <image src="/static/noExam.png" v-show="fetch.taskStatus == '2'" mode=""></image> --> >
待审核
</h4>
<h4
v-show="fetch.taskStatus == '28'"
style="border: 1px solid #27D870; color: #27D870;"
>
已审核
</h4>
</view> </view>
</view> </view>
<!-- <view class="btm-sticky"> <!-- <view class="btm-sticky">
@ -326,13 +334,23 @@
} }
.sticky-area{ .sticky-area{
position: absolute; position: absolute;
top: 0; top: 20rpx;
right: 0; right: 20rpx;
width: 9vh; /* width: 11vh;
height: 8vh; height: 10vh;
image{ image{
width: 100%; width: 100%;
height: 100%; height: 100%;
} */
h4{
box-sizing: border-box;
padding: 8rpx 20rpx;
border-radius: 15rpx;
font-size: 14px;
font-weight: normal;
background-color: #fff;
border: 1px solid #3788FF;
color: #3788FF;
} }
} }
} }

View File

@ -1,53 +1,64 @@
<template> <template>
<view> <view>
<view class="notice-data"> <view class="notice-data">
<view>公告标题{{ listData.noticeTitle }}</view> <view>公告标题{{ listData.noticeTitle }}</view>
<view>创建者{{ listData.createBy }}</view> <view>创建者{{ listData.createBy }}</view>
<view>创建时间{{ listData.createTime }}</view> <view>创建时间{{ listData.createTime }}</view>
<view>公告内容{{ listData.noticeContent }}</view> <view style="word-wrap: break-word;">公告内容{{ listData.noticeContent }}</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
listData: '' listData: ""
} };
}, },
methods: { methods: {
extractTextFromHTML(htmlString) {
}, return htmlString.replace(/<[^>]*>/g, "");
onLoad(params) { }
let that = this },
console.log(params.noticeId); onLoad(params) {
// let that = this;
that.$api.index.singleNotice({ console.log(params.noticeId);
noticeId: params.noticeId //
}).then(res => { that.$api.index
console.log(res); .singleNotice({
if (res.data.code == 200) { noticeId: params.noticeId
that.listData = res.data.data })
} .then(res => {
}).catch(err => { console.log(res);
console.log(err); if (res.data.code == 200) {
}) that.listData = res.data.data;
} let centent = decodeURIComponent(
} escape(atob(that.listData.noticeContent))
);
that.listData.noticeContent = this.extractTextFromHTML(centent).replace(/&nbsp;/ig, "");
console.log(that.listData.noticeContent);
}
})
.catch(err => {
console.log(err);
});
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
.notice-data{ .notice-data {
width: 90%; width: 90%;
margin: 20rpx auto; margin: 20rpx auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
view{ view {
margin-bottom: 15rpx; margin-bottom: 15rpx;
} }
view:last-child{ view:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
} }
</style> </style>

View File

@ -26,6 +26,7 @@
</uni-forms-item> </uni-forms-item>
<view class="bind" @click="toggleBind">绑定</view> <view class="bind" @click="toggleBind">绑定</view>
</uni-forms> </uni-forms>
<u-loading-page :loading="showLoading" color="#000" loading-text="加载中,请稍后..."></u-loading-page>
</view> </view>
</template> </template>
@ -33,6 +34,7 @@
export default { export default {
data() { data() {
return { return {
showLoading: false,
qrFormData: { qrFormData: {
typeVal: '', typeVal: '',
specVal: '', specVal: '',
@ -102,19 +104,23 @@
return item.value == e return item.value == e
}) })
console.log(confirmedRange); console.log(confirmedRange);
that.qrFormData.deviceCode = 'NS' + confirmedRange[0].code + confirmedRange[0].modelCode that.qrFormData.deviceCode = `NS${confirmedRange[0].code}${confirmedRange[0].modelCode}`
}, },
toggleBind () { toggleBind () {
let that = this let that = this
that.showLoading = true
console.log(that.qrcode);
that.$refs.qrForm.validate().then(formData => { that.$refs.qrForm.validate().then(formData => {
console.log(formData); console.log(formData);
that.$api.qrcodeBinding.bindQrcode({ that.$api.qrcodeBinding.bindQrcode({
typeId: formData.specVal, typeId: formData.specVal,
maCode: formData.deviceCode, maCode: formData.deviceCode,
qrCode: that.qrcode qrCode: that.qrcode,
maStatus: 15
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
@ -123,6 +129,7 @@
} }
}) })
} else { } else {
that.showLoading = false
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: res.data.msg title: res.data.msg

View File

@ -134,7 +134,7 @@ export default {
barcode = plus.barcode.create('barcode', [plus.barcode.QR, plus.barcode.EAN13, plus.barcode.EAN8, plus.barcode.CODE128], { barcode = plus.barcode.create('barcode', [plus.barcode.QR, plus.barcode.EAN13, plus.barcode.EAN8, plus.barcode.CODE128], {
top: '10%', top: '10%',
left: '0', left: '0',
width: '100%', width: '100vw',
height: '90%', height: '90%',
scanbarColor: '#46B81E', scanbarColor: '#46B81E',
position: 'static', position: 'static',

View File

@ -58,6 +58,42 @@
</view> </view>
</view> </view>
</view> </view>
<uni-popup
ref="popup"
type="center"
:mask-click="false"
>
<view class="popup">
<view class="pop-top">
<h4>审批</h4>
<uni-icons
style="color: #AAAAAA; font-weight: bold;"
type="closeempty"
@click="closePopup"
>
</uni-icons>
</view>
<h4 style="width: 85%; margin: 2vh auto; font-weight: normal; text-align: center;">是否通过审批</h4>
<view class="select-area">
<view @click="modalConfirm">通过</view>
<view @click="modalReject">驳回</view>
<!-- <uni-forms ref="examForm" :modelValue="examFormData" :rules="rules" label-position="top">
<uni-forms-item name="ifPass" required label="是否通过" label-width="150">
<uni-data-select
v-model="examFormData.ifPass"
:localdata="ifPassRange"
:clear="false"
@change="ifPassChange"
></uni-data-select>
</uni-forms-item>
<uni-forms-item required v-show="examFormData.ifPass == '1'" name="noPassReason" label="不通过原因" label-width="150">
<uni-easyinput type="textarea" v-model="examFormData.noPassReason" placeholder="请输入内容"></uni-easyinput>
</uni-forms-item>
<button class="submit-btn" @click="formSubmit">确认</button>
</uni-forms> -->
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -125,11 +161,12 @@
title: '未选中审核项!' title: '未选中审核项!'
}) })
} else { } else {
uni.showModal({ that.openPopup()
/* uni.showModal({
title: '确认审核', title: '确认审核',
content: '是否通过审核?', content: '是否通过审核?',
confirmText: '通过', confirmText: '通过',
// cancelText: '', cancelText: '驳回',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
that.inStoreList.forEach((item) => { that.inStoreList.forEach((item) => {
@ -137,15 +174,15 @@
}) })
console.log(that.inStoreList); console.log(that.inStoreList);
that.subInStore(that.inStoreList) that.subInStore(that.inStoreList)
}/* else if (res.cancel) { } else if (res.cancel) {
that.inStoreList.forEach((item) => { that.inStoreList.forEach((item) => {
item.checkType = 2 item.checkType = 2
}) })
console.log(that.inStoreList); console.log(that.inStoreList);
that.subInStore(that.inStoreList) that.subInStore(that.inStoreList)
} */ }
} }
}) }) */
} }
}, },
subInStore (obj) { subInStore (obj) {
@ -160,6 +197,7 @@
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
success: () => { success: () => {
that.closePopup()
/* uni.redirectTo({ /* uni.redirectTo({
url: '/pages/repairTestInStore/repairTestInStore' url: '/pages/repairTestInStore/repairTestInStore'
}) */ }) */
@ -173,6 +211,26 @@
}) })
} }
}) })
},
openPopup () {
this.$refs.popup.open()
},
closePopup () {
this.$refs.popup.close()
},
modalConfirm () {
this.inStoreList.forEach(item => {
item.checkType = 1
})
console.log(this.inStoreList);
this.subInStore(this.inStoreList)
},
modalReject () {
this.inStoreList.forEach(item => {
item.checkType = 2
})
console.log(this.inStoreList);
this.subInStore(this.inStoreList)
} }
}, },
onLoad(params) { onLoad(params) {
@ -195,7 +253,7 @@
console.log(that.fetchList); console.log(that.fetchList);
} }
}).catch(err => { }).catch(err => {
console.log(err);
}) })
} }
} }
@ -308,4 +366,41 @@
width: 150rpx; width: 150rpx;
text-align: center; text-align: center;
} }
.popup{
width: 80vw;
height: 20vh;
background-color: #fff;
border-radius: 15rpx;
overflow: hidden;
background: linear-gradient(#D9E7FE, #fff, #fff, #fff);
}
.popup>.pop-top{
width: 100%;
height: 5vh;
box-sizing: border-box;
padding: 0 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.popup>.select-area{
width: 85%;
margin: 40rpx auto;
display: flex;
justify-content: space-around;
align-items: center;
}
.popup>.select-area>view{
box-sizing: border-box;
font-size: 30rpx;
padding: 12rpx 24rpx;
background-color: #3788FF;
color: #fff;
border-radius: 20rpx;
}
</style> </style>

View File

@ -73,6 +73,7 @@
maId: that.infoList[0].maId, maId: that.infoList[0].maId,
carCode: that.carCode, carCode: that.carCode,
outNum: 1, outNum: 1,
manageType: 0,
companyId: uni.getStorageSync('userInfo').sysUser.companyId companyId: uni.getStorageSync('userInfo').sysUser.companyId
} }
console.log(that.subList); console.log(that.subList);

View File

@ -81,6 +81,11 @@
icon: 'none', icon: 'none',
title: '编码与机具类型不匹配!' title: '编码与机具类型不匹配!'
}) })
} else if (this.infoList[0].sdId != '16') {
uni.showToast({
icon: 'none',
title: '该机具状态不是在用,无法接受退料!'
})
} else { } else {
const arrList = [{ const arrList = [{
"parentId": this.initData.parentId, "parentId": this.initData.parentId,
@ -97,6 +102,8 @@
taskId: this.initData.taskId, taskId: this.initData.taskId,
arr: arrList arr: arrList
} }
console.log(params);
// //
that.$api.backMaterialReceive.backMaterialSetCodeBack(params).then(res => { that.$api.backMaterialReceive.backMaterialSetCodeBack(params).then(res => {
console.log(res); console.log(res);

View File

@ -67,6 +67,42 @@
</view> </view>
</view> </view>
</view> </view>
<uni-popup
ref="popup"
type="center"
:mask-click="false"
>
<view class="popup">
<view class="pop-top">
<h4>审批</h4>
<uni-icons
style="color: #AAAAAA; font-weight: bold;"
type="closeempty"
@click="closePopup"
>
</uni-icons>
</view>
<h4 style="width: 85%; margin: 2vh auto; font-weight: normal; text-align: center;">是否通过审批</h4>
<view class="select-area">
<view @click="modalConfirm">通过</view>
<view @click="modalReject">驳回</view>
<!-- <uni-forms ref="examForm" :modelValue="examFormData" :rules="rules" label-position="top">
<uni-forms-item name="ifPass" required label="是否通过" label-width="150">
<uni-data-select
v-model="examFormData.ifPass"
:localdata="ifPassRange"
:clear="false"
@change="ifPassChange"
></uni-data-select>
</uni-forms-item>
<uni-forms-item required v-show="examFormData.ifPass == '1'" name="noPassReason" label="不通过原因" label-width="150">
<uni-easyinput type="textarea" v-model="examFormData.noPassReason" placeholder="请输入内容"></uni-easyinput>
</uni-forms-item>
<button class="submit-btn" @click="formSubmit">确认</button>
</uni-forms> -->
</view>
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -140,7 +176,8 @@
title: '未选中审核项!' title: '未选中审核项!'
}) })
} else { } else {
uni.showModal({ that.openPopup()
/* uni.showModal({
title: '确认审核', title: '确认审核',
content: '是否通过审核?', content: '是否通过审核?',
confirmText: '通过', confirmText: '通过',
@ -156,15 +193,15 @@
} }
console.log(that.subObj); console.log(that.subObj);
that.subInStore(that.subObj) that.subInStore(that.subObj)
}/* else if (res.cancel) { } else if (res.cancel) {
that.inStoreList.forEach((item) => { that.inStoreList.forEach((item) => {
item.checkType = 2 item.checkType = 2
}) })
console.log(that.inStoreList); console.log(that.inStoreList);
that.subInStore(that.inStoreList) that.subInStore(that.inStoreList)
} */ }
} }
}) }) */
} }
}, },
subInStore (obj) { subInStore (obj) {
@ -177,9 +214,7 @@
icon: 'none', icon: 'none',
title: res.data.msg, title: res.data.msg,
success: () => { success: () => {
/* uni.redirectTo({ that.closePopup()
url: '/pages/repairTestInStore/repairTestInStore'
}) */
uni.navigateBack() uni.navigateBack()
} }
}) })
@ -190,6 +225,34 @@
}) })
} }
}) })
},
openPopup () {
this.$refs.popup.open()
},
closePopup () {
this.$refs.popup.close()
},
modalConfirm () {
let that = this
that.taskIdList.push(that.taskId)
that.subObj = {
checkResult: '通过',
taskIdList: that.taskIdList,
auditDetailList: that.auditDetailList
}
console.log(that.subObj);
that.subInStore(that.subObj)
},
modalReject () {
let that = this
that.taskIdList.push(that.taskId)
that.subObj = {
checkResult: '驳回',
taskIdList: that.taskIdList,
auditDetailList: that.auditDetailList
}
console.log(that.subObj);
that.subInStore(that.subObj)
} }
}, },
onLoad(params) { onLoad(params) {
@ -341,4 +404,41 @@
width: 150rpx; width: 150rpx;
text-align: center; text-align: center;
} }
.popup{
width: 80vw;
height: 20vh;
background-color: #fff;
border-radius: 15rpx;
overflow: hidden;
background: linear-gradient(#D9E7FE, #fff, #fff, #fff);
}
.popup>.pop-top{
width: 100%;
height: 5vh;
box-sizing: border-box;
padding: 0 25rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.popup>.select-area{
width: 85%;
margin: 40rpx auto;
display: flex;
justify-content: space-around;
align-items: center;
}
.popup>.select-area>view{
box-sizing: border-box;
font-size: 30rpx;
padding: 12rpx 24rpx;
background-color: #3788FF;
color: #fff;
border-radius: 20rpx;
}
</style> </style>