main
liudan 2 years ago
parent 653a93745b
commit 9c622c9e39
  1. 5
      api/user.js
  2. 81
      pages/taskDetail/taskDetail.vue

@ -35,6 +35,11 @@ export function getDeails(params){
export function submitHandle(params){
return http.post('/subNum', params)
}
export function confirmProcedureHandle(params){
return http.post('/confirmProcedure', params)
}
//更改配置项,阻止loading提示
// export function getUserInfo(params){
// return http.post('api/login', {custom:{ShowLoading:false}})

@ -19,14 +19,25 @@
<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 @click="sheetShow = true">
<u-cell size="large" title="不良品选项" center :disabled="info.status==3?true:false" @click="sheetShow = true">
<view slot="value" style="flex:1;position: relative; " class="u-slot-value">
{{contentInfo.rejects}}
<u-icon name="arrow-down" :class="!contentInfo.rejects?'isEmpty':'notEmpty'"
color="#333333" size="21"></u-icon>
</view>
</u-cell>
<u-cell size="large" title="不良品数量" :value="contentInfo.rejects_num.toString()" center></u-cell>
<u-cell size="large" title="不良品数量" center>
<view slot="value" class="u-slot-value">
<u--input
placeholder="请输入不良品数量"
border="none"
style="background: #ffffff;"
:disabled="info.status==3?true:false"
v-model="contentInfo.rejects_num"
clearable
></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" title="待质检数量" :value="contentInfo.member_num.toString()" center></u-cell>
@ -39,7 +50,8 @@
<view slot="value" class="u-slot-value fujian" @click="downLoad(contentInfo.file)" style="display: flex;align-items: center;">
<image src="../../static/img.png" v-if="contentInfo.file_suffix=='png'" mode=""></image>
<image src="../../static/pdf.png" v-if="contentInfo.file_suffix=='pdf'" mode=""></image>
<text style="overflow: hidden;width:400upx;text-overflow: ellipsis;">{{contentInfo.file}}</text>
<!-- <text style="overflow: hidden;width:400upx;text-overflow: ellipsis;">{{contentInfo.file}}</text> -->
<text style="color:#0076F6;text-decoration: underline;">查看</text>
</view>
</u-cell>
<u-cell size="large" title="拍照" center class="img" :border="false">
@ -49,6 +61,7 @@
@afterRead="afterRead"
@delete="deletePic"
name="5"
:disabled="info.status==3?true:false"
:previewFullImage="true"
multiple
:maxCount="3"
@ -57,11 +70,12 @@
</u-cell>
</u-cell-group>
</view>
<view class="submitContent">
<view class="submitContent" v-if="info.status!=3">
<u--input
placeholder="请输入完成数量"
border="surround"
v-model="num"
:disabled="info.status==3?true:false"
class="input"
shape="circle"
></u--input>
@ -83,7 +97,7 @@
v-for="(item, index) in checkboxList1"
:key="index"
:label="item.name"
:name="item.id"
:name="item.name"
>
</u-checkbox>
</u-checkbox-group>
@ -110,14 +124,14 @@
<script>
import {getDeails,logout,submitHandle} from "@/api/user.js"
import {getDeails,logout,submitHandle,confirmProcedureHandle} from "@/api/user.js"
export default {
data() {
return {
info:{},
show:false,
contentInfo:{
rejects:null,
rejects:'',
rejects_num:0,
statusName:null,
member_num:0,
@ -151,8 +165,8 @@
let params={
id:this.info.id,
num:this.num,
rejects:this.checkboxValue1.join(','),
rejects_num:this.checkboxValue1.length,
rejects:this.contentInfo.rejects,
rejects_num:this.contentInfo.rejects_num,
imgs:imgs.join(',')
}
console.log(params)
@ -165,7 +179,7 @@
title: '操作成功'
})
uni.redirectTo({
url:'/pages/processList/processList?id='+this.info.taskId
url:'/pages/processList/processList?id='+this.info.taskId+'&heat_num=' +this.info.heat_num
})
}
})
@ -248,16 +262,7 @@
},
besure(){
let text="";
this.checkboxValue1.forEach(item=>{
let obj = this.checkboxList1.filter(i=>{
return i.id==item
})
text+=obj[0].name+','
})
console.log(text)
this.contentInfo.rejects = text
this.contentInfo.rejects_num = this.checkboxValue1.length;
this.contentInfo.rejects = this.checkboxValue1.join(",")
this.sheetShow = false
},
rejectHandle(){
@ -267,12 +272,7 @@
close() {
this.show = false
},
getData(){
getTaskList().then(res=>{
console.log(res)
this.taskList = res.data
})
},
changeUser(){
logout().then(res=>{
console.log(res)
@ -285,9 +285,17 @@
this.$store.commit('logout')
})
},
confirmProcedureHandle(id){
confirmProcedureHandle({id:id}).then(res=>{
if(res.code==200){
this.getDeails(id)
}
})
},
getDeails(id){
getDeails({id:id}).then(res=>{
console.log(res.data,"ppppp")
this.contentInfo.rejects_num = res.data.rejects_num;
this.contentInfo.content = res.data.content
this.contentInfo.member_num = res.data.procedure_member.member_num
@ -315,19 +323,19 @@
this.contentInfo.needing_remake = res.data.needing_remake
this.checkboxList1 = res.data.rejects_list;
let text="";
if(res.data.rejects){
res.data.rejects.split(",").forEach(item=>{
this.checkboxValue1.push(Number(item))
let obj = this.checkboxList1.filter(i=>{
return i.id==item
})
text+=obj[0].name+','
this.checkboxValue1.push(item)
})
console.log(text)
this.contentInfo.rejects = text
}
this.contentInfo.rejects = res.data.rejects
if(res.data.procedure_member.imgs){
res.data.procedure_member.imgs.forEach(i=>{
this.fileList.push({url:i,path:i.substr(25)})
})
}
if(this.contentInfo.needing_remake){
this.startVisible = true;
@ -352,7 +360,8 @@
if(uni.getStorageSync('userToken')){
console.log(option,"0000")
this.info = option
this.getDeails(option.id)
this.confirmProcedureHandle(option.id)
// this.getDeails(option.id)
}else{
uni.redirectTo({
url:'/pages/login/login'

Loading…
Cancel
Save