Browse Source

feat: update 叫料增加弹窗提示

master
TengXF 6 months ago
parent
commit
0563fbc0a8
  1. 44
      src/pages/mes/workScheduling/callMaterial.vue

44
src/pages/mes/workScheduling/callMaterial.vue

@ -17,11 +17,17 @@
<view class="dec"> <view class="dec">
<view>计划数量</view><view>{{ item.srcMaterialCounts * planCountStr }}</view> <view>计划数量</view><view>{{ item.srcMaterialCounts * planCountStr }}</view>
</view> </view>
<view> <view class="dec" style="font-weight: bold;">
<view >叫料数量</view>
<view ><u-number-box v-model="item.totalMaterialCounts" style="width:150px" :max="(item.srcMaterialCounts * planCountStr)" :positive-integer="false"></u-number-box>
<!-- <u-input v-model="item.srcMaterialCounts" type="number" placeholder="补料数量" border="true" clearable="true" style="width: 100px;" @update:modelValue="calculatePass(item,queryForm.planCount)" /> -->
</view>
</view>
<!-- <view>
<u-form-item label="叫料数量" prop="callMaterialCounts"> <u-form-item label="叫料数量" prop="callMaterialCounts">
<u-input v-model="item.totalMaterialCounts" placeholder="请输入叫料数量"/> <u-input v-model="item.totalMaterialCounts" placeholder="请输入叫料数量"/>
</u-form-item> </u-form-item>
</view> </view> -->
</view> </view>
<view > <view >
<u-button type="primary" @click="submitCMForm()">提交</u-button> <u-button type="primary" @click="submitCMForm()">提交</u-button>
@ -109,23 +115,31 @@ function submitCMForm () {
proxy.$modal.alert("叫料数量不能大于计划数量"); proxy.$modal.alert("叫料数量不能大于计划数量");
return return
} }
if( parseInt(list.value[i].totalMaterialCounts) == 0 ){
proxy.$modal.alert("叫料数量不能为0");
return
}
} }
param.value.remark = JSON.stringify(list.value) proxy.$modal.confirm('确定提交处理吗').then(() => {
workSchedulingListApi.callBasicItemForm(param.value).then((res) => { param.value.remark = JSON.stringify(list.value)
console.log(res) workSchedulingListApi.callBasicItemForm(param.value).then((res) => {
if (res.data) { console.log(res)
proxy.$modal.showToast('成功') if (res.data) {
setTimeout(() => { proxy.$modal.showToast('成功')
proxy.$tab.navigateBack() setTimeout(() => {
proxy.$tab.navigateBack()
loading.value = false
proxy.$modal.closeLoading()
}, 1000)
}else{
proxy.$modal.showToast('失败')
loading.value = false loading.value = false
proxy.$modal.closeLoading() proxy.$modal.closeLoading()
}, 1000) }
}else{ })
proxy.$modal.showToast('失败')
loading.value = false
proxy.$modal.closeLoading()
}
}) })
} }
// //

Loading…
Cancel
Save