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