|
|
@ -61,7 +61,7 @@ |
|
|
|
|
|
|
|
<view class="list"> |
|
|
|
<view class="title"> |
|
|
|
<span>*</span>备件 |
|
|
|
<span></span>备件 |
|
|
|
</view> |
|
|
|
<view class="item " v-for="(item,index) in form.itemNumbers" :key="index"> |
|
|
|
<view class="item-box"> |
|
|
@ -202,7 +202,19 @@ const form = ref({ |
|
|
|
|
|
|
|
const factoryAreaNumber = ref('') |
|
|
|
const chooseUserList = ref([]) |
|
|
|
|
|
|
|
// 验证正整数 |
|
|
|
function validateInteger(value){ |
|
|
|
if (value) { |
|
|
|
const integerReg = /^[+]{0,1}(\d+)$/ |
|
|
|
if (integerReg.test(value)) { |
|
|
|
return true |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
// 触发提交表单 |
|
|
|
function submit() { |
|
|
|
// 校验 |
|
|
@ -214,6 +226,10 @@ const form = ref({ |
|
|
|
proxy.$modal.showToast('请输入实际分钟') |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!validateInteger(form.value.actualMinutes)) { |
|
|
|
proxy.$modal.showToast('实际分钟请输入正整数') |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!form.value.chargePeoples) { |
|
|
|
proxy.$modal.showToast('请选择负责人') |
|
|
|
return; |
|
|
@ -281,19 +297,15 @@ const form = ref({ |
|
|
|
} |
|
|
|
// 重置 |
|
|
|
function reset() { |
|
|
|
form.value = { |
|
|
|
number: '', |
|
|
|
name: '', |
|
|
|
peoples: null, |
|
|
|
estimatedMinutes: '', |
|
|
|
actualMinutes: '', |
|
|
|
chargePeoples: '', |
|
|
|
status:null, |
|
|
|
completionTime: '', |
|
|
|
engineer: '', |
|
|
|
uncompleted: '', |
|
|
|
itemNumbers: [] |
|
|
|
} |
|
|
|
form.value.actualMinutes ='' |
|
|
|
form.value.chargePeoples ='' |
|
|
|
form.value.status =null |
|
|
|
form.value.statusTxt ='' |
|
|
|
form.value.completionTime ='' |
|
|
|
form.value.engineer ='' |
|
|
|
form.value.uncompleted ='' |
|
|
|
form.value.itemNumbers =[] |
|
|
|
|
|
|
|
} |
|
|
|
// 获取人员列表 |
|
|
|
async function getSelecUser() { |
|
|
@ -388,10 +400,6 @@ const form = ref({ |
|
|
|
} |
|
|
|
// 添加配件 |
|
|
|
function addSpare() { |
|
|
|
if (!form1.value.number) { |
|
|
|
proxy.$modal.showToast('请选择备件') |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!form1.value.qty || form1.value.qty == 0) { |
|
|
|
proxy.$modal.showToast('请输入数量') |
|
|
|
return; |
|
|
@ -454,6 +462,7 @@ const form = ref({ |
|
|
|
form.value = JSON.parse(decodeURIComponent(option.data)) |
|
|
|
form.value.itemNumbers = form.value.items |
|
|
|
formatDate.value = form.value.completionTime ? proxy.$time.formatDate(form.value.completionTime * 1000) : '' |
|
|
|
form.value.statusTxt = form.value.status == 0 ? '完成' :'未完成' |
|
|
|
}; |
|
|
|
jxDetailsStatus.value = await dictApi.getDict('jx_details_status') |
|
|
|
|
|
|
|