|
|
@ -66,40 +66,82 @@ |
|
|
|
{{ c.name }} |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="item-input" |
|
|
|
:key="wi" |
|
|
|
v-for="(w, wi) in c.workorderParamStepthreeList" |
|
|
|
> |
|
|
|
<view class="Work-List" |
|
|
|
:key="xi" |
|
|
|
v-for="(x, xi) in 10" |
|
|
|
<template |
|
|
|
v-if="c.paramType == 1"> |
|
|
|
<view class="item-input" |
|
|
|
:key="wi" |
|
|
|
v-for="(w, wi) in c.workorderParamStepthreeList" |
|
|
|
> |
|
|
|
<view class="label"> |
|
|
|
规格{{ xi + 1 }}: |
|
|
|
</view> |
|
|
|
<view class="text"> |
|
|
|
<input type="text" |
|
|
|
v-model="w['param' + (xi + 1)]"/> |
|
|
|
</view> |
|
|
|
<view class="text" |
|
|
|
v-if="" |
|
|
|
style="margin-left: 20rpx;"> |
|
|
|
{{ w.specs }} |
|
|
|
<view class="image-box"> |
|
|
|
<view class="image" |
|
|
|
:key="xi" |
|
|
|
v-for="(x, xi) in 10"> |
|
|
|
|
|
|
|
<image |
|
|
|
v-if="w['param' + (xi + 1)]" |
|
|
|
:src="w['param' + (xi + 1)]" |
|
|
|
@click="previewImage([w['param' + (xi + 1)]], 0)" |
|
|
|
mode="aspectFill"></image> |
|
|
|
|
|
|
|
<view class="add-image" |
|
|
|
v-else |
|
|
|
@click="upload(w, 'param' + (xi + 1))"> |
|
|
|
<uv-icon |
|
|
|
size="40rpx" |
|
|
|
name="plus" |
|
|
|
color="#00000022" |
|
|
|
></uv-icon> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="delete" |
|
|
|
@click="del(w, 'param' + (xi + 1))" |
|
|
|
v-if="w['param' + (xi + 1)]"> |
|
|
|
x |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="Work-List" |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template v-else> |
|
|
|
<view class="item-input" |
|
|
|
:key="wi" |
|
|
|
v-for="(w, wi) in c.workorderParamStepthreeList" |
|
|
|
> |
|
|
|
<view class="label"> |
|
|
|
作业员: |
|
|
|
<view class="Work-List" |
|
|
|
:key="xi" |
|
|
|
v-for="(x, xi) in 10" |
|
|
|
> |
|
|
|
<view class="label"> |
|
|
|
规格{{ xi + 1 }}: |
|
|
|
</view> |
|
|
|
<view class="text"> |
|
|
|
<input type="text" |
|
|
|
v-model="w['param' + (xi + 1)]"/> |
|
|
|
</view> |
|
|
|
<view class="text" |
|
|
|
v-if="w.specs" |
|
|
|
style="margin-left: 20rpx;"> |
|
|
|
{{ w.specs }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="text"> |
|
|
|
<input type="text" |
|
|
|
style="width: 450rpx;" |
|
|
|
v-model="w.operator"/> |
|
|
|
|
|
|
|
<view class="Work-List" |
|
|
|
> |
|
|
|
<view class="label"> |
|
|
|
作业员: |
|
|
|
</view> |
|
|
|
<view class="text"> |
|
|
|
<input type="text" |
|
|
|
style="width: 450rpx;" |
|
|
|
v-model="w.operator"/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
@ -147,6 +189,21 @@ |
|
|
|
}, res =>{ |
|
|
|
if(res.code == 200){ |
|
|
|
let p = res.result.workorderStepList[this.index] |
|
|
|
|
|
|
|
for(let i = 0;i < p.workorderProcessList.length;i++){ |
|
|
|
let step = p.workorderProcessList[i] |
|
|
|
for(let j = 0;j < step.workorderItemCheckList.length;j++){ |
|
|
|
let check = step.workorderItemCheckList[j] |
|
|
|
|
|
|
|
if(check.workorderParamStepthreeList.length == 0){ |
|
|
|
check.workorderParamStepthreeList.push({ |
|
|
|
processId : check.id, |
|
|
|
templateId : this.id, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.stepList = p.workorderProcessList |
|
|
|
} |
|
|
|
}) |
|
|
@ -162,6 +219,12 @@ |
|
|
|
delete data.createBy |
|
|
|
delete data.createTime |
|
|
|
|
|
|
|
for (let k in data) { |
|
|
|
if(!data[k] || data[k] == 'null'){ |
|
|
|
data[k] = '' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.$api('updateParamStepThree', data, res => { |
|
|
|
if(res.code == 200){ |
|
|
|
success(res) |
|
|
@ -185,9 +248,8 @@ |
|
|
|
this.$api('updateGeneralStepThree', StepOne, res => { |
|
|
|
}) |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
uni.showLoading({ |
|
|
|
title: '保存中...', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
|
|
|
|
// 任务列表 |
|
|
@ -216,6 +278,18 @@ |
|
|
|
|
|
|
|
setTimeout(uni.navigateBack, 1000, -1) |
|
|
|
}, |
|
|
|
upload(w, key){ |
|
|
|
this.$Oss.ossUploadImage({ |
|
|
|
success : url => { |
|
|
|
w[key] = url |
|
|
|
this.$forceUpdate() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
del(w, key){ |
|
|
|
w[key] = '' |
|
|
|
this.$forceUpdate() |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
@ -255,6 +329,46 @@ |
|
|
|
.label{ |
|
|
|
width: 130rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.image-box{ |
|
|
|
display: flex; |
|
|
|
width: 100%; |
|
|
|
flex-shrink: 0; |
|
|
|
flex-wrap: wrap; |
|
|
|
.image{ |
|
|
|
width: 100rpx; |
|
|
|
height: 100rpx; |
|
|
|
margin: 10rpx; |
|
|
|
position: relative; |
|
|
|
image{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
border-radius: 20rpx; |
|
|
|
} |
|
|
|
.add-image{ |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
border: 1rpx solid #00000022; |
|
|
|
border-radius: 20rpx; |
|
|
|
} |
|
|
|
.delete{ |
|
|
|
width: 30rpx; |
|
|
|
height: 30rpx; |
|
|
|
background-color: #00000066; |
|
|
|
color: #fff; |
|
|
|
position: absolute; |
|
|
|
right: 0; |
|
|
|
top: 0; |
|
|
|
font-size: 22rpx; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
input{ |
|
|
|