main
liudan 2 years ago
parent 7f78c064f0
commit 09eed12726
  1. 3
      api/user.js
  2. 168
      pages/checkList/checkList.vue
  3. 13
      pages/taskDetail/taskDetail.vue

@ -39,6 +39,9 @@ export function submitHandle(params){
export function confirmProcedureHandle(params){
return http.post('/confirmProcedure', params)
}
export function procedureCheckHandle(params){
return http.post('/procedureCheck', params)
}
//更改配置项,阻止loading提示
// export function getUserInfo(params){

@ -16,62 +16,128 @@
</view>
</u-popup>
<view v-if="taskList.length!=0" style="margin-top:44px;">
<view class="taskItem" v-for="(item,index) in taskList" :key="index">
<view class="title">机器编号{{item.name}}</view>
<view class="item" v-for="i in item.list" :key="i.id">
<view class="rowItem">
<view class="taskItem" v-for="(i,index) in taskList" :key="index">
<view class="item">
<view class="code rowItem">
<view>
炉号{{i.heat_number}}
</view>
<view>
任务编号{{i.art_number}}
</view>
</view>
<view class="rowItem code">
<view class="num">
炉号{{i.heat_number?i.heat_number:'-'}}
待质检数{{i.num}}
</view>
<view>
员工{{i.username}}
</view>
<view :class="i.status == 1?'status right':'status right finish'">
状态<text>{{i.status == 1 ? '未完成' : '已完成'}}</text>
</view>
<view class="rowItem">
<view class="num" style="color:#E03023">
注意事项{{i.needing_remake?i.needing_remake:'-'}}
</view>
<view class="code rowItem">
编号{{i.art_number}}
</view>
<view class="code rowItem">
<view class="num">
附件<text @click="downLoad(i)" style="color:#0076F6;text-decoration: underline;margin-left:10upx;">查看</text>
</view>
<view>
数量{{i.total}}
数量<text>{{i.total}}</text>
</view>
</view>
<view class="right">
面次{{i.face}}
<view class="code rowItem" style="color:#E03023" v-for="(p,r) in i.content" :key="r">
<view>
{{p.key}}
</view>
<view>
{{p.value}}
</view>
<view class="rowItem">
<view class="planTime">
计划完成时间{{i.real_time ? i.real_time : '-'}}
</view>
<view class="lookdetails right" @click="goProgress(i)">
<!-- 查看详情 -->检测
<view class="code rowItem" v-if="i.rejects!='null'">
不良品{{i.rejects}}
</view>
<view class="code rowItem">
<view>
不良品数量{{i.rejects_num}}
</view>
<view class="lookdetails" v-if="isCheck==2" @click="checkHandle(i)">
检测
</view>
<view class="planTime rowItem">
备注{{i.remake}}
</view>
</view>
</view>
</view>
<view v-else class="empty-list">
<view class="empty-list-content">
<image src="/static/list-empty.png"></image>
<p class="empty-list-text">暂无数据</p>
</view>
</view>
<u-modal :show="checkDialog" class="checkDialog"
:showCancelButton="true"
confirmText="确认检测"
@confirm="confirmHandle"
@cancel="checkDialog=false"
title="检测" >
<view class="slot-content">
<text>合格数</text>
<u--input
placeholder="请输入内容"
border="surround"
v-model="qualified_num"
></u--input>
</view>
</u-modal>
</view>
</template>
<script>
import {checkList,logout} from "@/api/user.js"
import {checkList,logout,procedureCheckHandle} from "@/api/user.js"
export default {
data() {
return {
taskList:[],
show:false
show:false,
isCheck:0,
checkDialog:false,
qualified_num:'',
selectedId:null
};
},
methods:{
checkHandle(i){
console.log(i)
this.selectedId = i.id;
this.checkDialog = true
},
confirmHandle(){
if(!this.qualified_num){
uni.showToast({
icon: 'none',
mask: true,
title: '请输入合格数'
});
return;
}
procedureCheckHandle({id:this.selectedId,num:this.qualified_num}).then(res=>{
if(code==200){
this.getData()
}else{
uni.showToast({
icon: 'none',
mask: true,
title: res.msg
});
}
})
},
close() {
this.show = false
},
@ -79,6 +145,7 @@
checkList().then(res=>{
console.log(res)
this.taskList = res.data.list
this.isCheck = res.data.is_check
})
},
changeUser(){
@ -93,6 +160,48 @@
this.$store.commit('logout')
})
},
downLoad(item) {
console.log(item)
if (item.file_suffix == 'png') {
uni.previewImage({
urls: [item.path]
})
} else {
uni.downloadFile({
url: item.path,
success: (data) => {
if (data.statusCode === 200) {
uni.saveFile({
tempFilePath: data.tempFilePath,
success: function(res) {
uni.showToast({
icon: 'none',
mask: true,
title: '文件已保存' + res.savedFilePath,
duration: 3000
});
setTimeout(() => {
uni.openDocument({
filePath: res.savedFilePath,
success: function(res) {
console.log('文档打开成功')
}
})
}, 3000)
}
})
}
},
fail: () => {
uni.showToast({
icon: 'none',
mask: true,
title: '失败请重新下载'
})
}
});
}
},
goProgress(item){
// uni.navigateTo({
// url:'/pages/processList/processList?id=' + item.id+'&code=' + item.art_number
@ -110,6 +219,17 @@
border-radius:20upx;
padding:50upx 70upx;
}
.checkDialog /deep/.u-popup__content{
padding: 0 !important;
}
.slot-content{
display: flex;
align-items: center;
text{
margin-right:20upx;
color:#333333
}
}
.taskList{
min-height: calc(100vh - 100upx);
background-color: #F7F8FA;
@ -128,7 +248,7 @@
background: #F6F6F6;
border-radius: 4upx;
padding:25upx 20upx;
margin-top:30upx;
// margin-top:30upx;
.rowItem{
margin-bottom:25upx;
display: flex;
@ -169,10 +289,11 @@
color: #999999;
}
.lookdetails{
font-size: 24upx;
font-size: 28upx;
font-family: Alibaba PuHuiTi;
font-weight: 400;
color: #0076F6;
text-decoration: underline;
}
}
}
@ -184,4 +305,5 @@
/deep/.u-navbar__content__left{
display: none;
}
</style>

@ -19,9 +19,11 @@
<view style="padding:0 24upx;">
<u-cell-group>
<u-cell size="large" center title="炉号" :value="info.heat_num" :titleStyle="{color:'#0076F6'}"></u-cell>
<u-cell size="large" title="不良品选项" center :disabled="info.status==3?true:false" @click="sheetShow = true">
<u-cell size="large" title="不良品选项" center
v-if="contentInfo.rejects!='null'?true:(info.status==3?false:true)"
:disabled="info.status==3?true:false" @click="sheetShow = true">
<view slot="value" style="flex:1;position: relative; " class="u-slot-value">
{{contentInfo.rejects}}
{{contentInfo.rejects!='null'?contentInfo.rejects:''}}
<u-icon name="arrow-down" :class="!contentInfo.rejects?'isEmpty':'notEmpty'"
color="#333333" size="21"></u-icon>
</view>
@ -38,7 +40,7 @@
></u--input>
</view>
</u-cell>
<u-cell size="large" :key="index" v-for="(item,index) in contentInfo.content" :titleStyle="{color:'#E03023'}" :title="item.key" center :value="item.value"></u-cell>
<u-cell size="large" :key="index" v-for="(item,index) in contentInfo.content" :titleStyle="{color:'#E03023'}" class="specialLabel" :title="item.key" center :value="item.value"></u-cell>
<u-cell size="large" title="待质检数量" :value="contentInfo.member_num.toString()" center></u-cell>
<u-cell size="large" title="合格数量" center :value="contentInfo.qualified_num.toString()"></u-cell>
@ -324,7 +326,7 @@
this.checkboxList1 = res.data.rejects_list;
if(res.data.rejects){
if(res.data.rejects!='null'){
res.data.rejects.split(",").forEach(item=>{
this.checkboxValue1.push(item)
})
@ -459,4 +461,7 @@
top:0px;
right:0;
}
.specialLabel /deep/.u-cell__value{
color:#E03023
}
</style>

Loading…
Cancel
Save