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

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

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

Loading…
Cancel
Save