|
@ -13,11 +13,17 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="dec-item"> |
|
|
<view class="dec-item"> |
|
|
<view>报工数量:</view> |
|
|
<view>报工数量:</view> |
|
|
<view><u-input v-model="formData.reportCount" type="number" @update:modelValue="calculatePass()" placeholder="请输入数量" /></view> |
|
|
<view> |
|
|
|
|
|
<u-number-box v-model="formData.reportCount" @change="calculatePass()" style="width:120px" :max="planCount"></u-number-box> |
|
|
|
|
|
<!-- <u-input v-model="formData.reportCount" type="number" @update:modelValue="calculatePass()" placeholder="请输入数量" /> --> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="dec-item"> |
|
|
<view class="dec-item"> |
|
|
<view>报工工时:</view> |
|
|
<view>报工工时:</view> |
|
|
<view><u-input v-model="formData.workTerm" type="number" placeholder="请输入工时" /></view> |
|
|
<view> |
|
|
|
|
|
<!-- <u-input v-model="formData.workTerm" type="number" placeholder="请输入工时" /> --> |
|
|
|
|
|
<u-number-box v-model="formData.workTerm" @change="valChange" style="width:120px"></u-number-box> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="dec-item"> |
|
|
<view class="dec-item"> |
|
|
<view>是否质检:</view> |
|
|
<view>是否质检:</view> |
|
@ -27,11 +33,17 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="dec-item"> |
|
|
<view class="dec-item"> |
|
|
<view>合格数量:</view> |
|
|
<view>合格数量:</view> |
|
|
<view><u-input :disabled="!formData.checkFlag" v-model="formData.qualified" type="number" placeholder="请输入合格数量" @update:modelValue="calculatePass()" /></view> |
|
|
<view> |
|
|
|
|
|
<u-number-box :disabled="!formData.checkFlag" v-model="formData.qualified" @change="calculatePass()" style="width:120px" :max="planCount"></u-number-box> |
|
|
|
|
|
<!-- <u-input :disabled="!formData.checkFlag" v-model="formData.qualified" type="number" placeholder="请输入合格数量" @update:modelValue="calculatePass()" /> --> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="dec-item"> |
|
|
<view class="dec-item"> |
|
|
<view>不合格数量:</view> |
|
|
<view>不合格数量:</view> |
|
|
<view><u-input v-model="formData.unqualified" type="number" disabled="true"/></view> |
|
|
<view> |
|
|
|
|
|
<u-number-box disabled="true" v-model="formData.unqualified" @change="calculatePass()" style="width:120px"></u-number-box> |
|
|
|
|
|
<!-- <u-input v-model="formData.unqualified" type="number" disabled="true"/> --> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -85,6 +97,7 @@ |
|
|
reportPersonName:'', |
|
|
reportPersonName:'', |
|
|
workTerm:'' |
|
|
workTerm:'' |
|
|
}) |
|
|
}) |
|
|
|
|
|
const planCount = ref(100) |
|
|
const saveData = ref({ |
|
|
const saveData = ref({ |
|
|
processCode:'', |
|
|
processCode:'', |
|
|
reportDate:'', |
|
|
reportDate:'', |
|
@ -94,11 +107,12 @@ |
|
|
|
|
|
|
|
|
function changeStatus(){ |
|
|
function changeStatus(){ |
|
|
if(formData.value.checkFlag){ |
|
|
if(formData.value.checkFlag){ |
|
|
|
|
|
formData.value.qualified = formData.value.reportCount |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
formData.value.qualified = '' |
|
|
formData.value.qualified = 0 |
|
|
formData.value.unqualified = '' |
|
|
formData.value.unqualified = 0 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
function calculatePass(){ |
|
|
function calculatePass(){ |
|
@ -144,7 +158,6 @@ |
|
|
const formattedTime = currentDate.toTimeString().split(' ')[0]; // HH:mm:ss |
|
|
const formattedTime = currentDate.toTimeString().split(' ')[0]; // HH:mm:ss |
|
|
// 设置 reportDate 为当前日期和时间 |
|
|
// 设置 reportDate 为当前日期和时间 |
|
|
saveData.value.reportDate = `${formattedDate} ${formattedTime}`; |
|
|
saveData.value.reportDate = `${formattedDate} ${formattedTime}`; |
|
|
console.log(saveData.value) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -177,6 +190,8 @@ |
|
|
nodeInfo.value.processCode = paramData.value.nodeCode |
|
|
nodeInfo.value.processCode = paramData.value.nodeCode |
|
|
saveData.value.processCode = paramData.value.nodeCode |
|
|
saveData.value.processCode = paramData.value.nodeCode |
|
|
saveData.value.schedulingCode = paramData.value.schedulingCode |
|
|
saveData.value.schedulingCode = paramData.value.schedulingCode |
|
|
|
|
|
planCount.value = paramData.value.planCount |
|
|
|
|
|
formData.value.reportCount = paramData.value.planCount |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
onShow(() => { |
|
|
onShow(() => { |
|
@ -194,7 +209,6 @@ |
|
|
} |
|
|
} |
|
|
//数据转换 |
|
|
//数据转换 |
|
|
function transList(data) { |
|
|
function transList(data) { |
|
|
console.log(data) |
|
|
|
|
|
const list = data.map(item => { |
|
|
const list = data.map(item => { |
|
|
return { |
|
|
return { |
|
|
"label": item.workerName, |
|
|
"label": item.workerName, |
|
|