This commit is contained in:
parent
b1fb77864d
commit
81c0abde4b
|
|
@ -271,8 +271,8 @@ export default {
|
|||
this.formData = {
|
||||
id,
|
||||
proAreaList: proArea.split(','),
|
||||
isNeed,
|
||||
type,
|
||||
isNeed: isNeed * 1,
|
||||
type: type * 1,
|
||||
subId: subId + '',
|
||||
proTypeList: proType ? proType.split(',') : [],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
:disabled="subIsDisabled"
|
||||
:disabled="subIsDisabled || formType === 2"
|
||||
placeholder="请选择所属分公司"
|
||||
v-model="addOrEditForm.subComId"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
style="width: 100%"
|
||||
placeholder="请选择分包名称"
|
||||
v-model="addOrEditForm.subId"
|
||||
:disabled="editFormData.id"
|
||||
>
|
||||
<el-option
|
||||
:key="item.value"
|
||||
|
|
|
|||
|
|
@ -1345,41 +1345,64 @@ export default {
|
|||
? editEntryPersonAPI
|
||||
: addEntryPersonAPI
|
||||
|
||||
const res = await API(
|
||||
formData,
|
||||
)
|
||||
if (res.code === 200) {
|
||||
resolve()
|
||||
this.$modal.msgSuccess(
|
||||
res.msg,
|
||||
try {
|
||||
const res = await API(
|
||||
formData,
|
||||
)
|
||||
|
||||
// 更新一下红绿灯状态
|
||||
const result =
|
||||
await updatePersonLightStatusAPI(
|
||||
{
|
||||
workerId:
|
||||
this
|
||||
.queryDetailsId
|
||||
? this
|
||||
.queryDetailsId
|
||||
: res.data,
|
||||
|
||||
proId: this
|
||||
.keyInfoForm
|
||||
.proId,
|
||||
},
|
||||
)
|
||||
console.log(
|
||||
result,
|
||||
'result红绿灯状态更新结果',
|
||||
res,
|
||||
'res请求结果',
|
||||
)
|
||||
} else {
|
||||
this.$modal.msgError(
|
||||
res.msg,
|
||||
if (res.code === 200) {
|
||||
resolve()
|
||||
this.$modal.msgSuccess(
|
||||
res.msg,
|
||||
)
|
||||
|
||||
const result =
|
||||
await updatePersonLightStatusAPI(
|
||||
{
|
||||
workerId:
|
||||
this
|
||||
.queryDetailsId
|
||||
? this
|
||||
.queryDetailsId
|
||||
: res.data,
|
||||
|
||||
proId: this
|
||||
.keyInfoForm
|
||||
.proId,
|
||||
},
|
||||
)
|
||||
console.log(
|
||||
result,
|
||||
'result红绿灯状态更新结果',
|
||||
)
|
||||
} else {
|
||||
console.log(
|
||||
res.msg,
|
||||
'请求失败--',
|
||||
)
|
||||
this.$modal.msgError(
|
||||
res.msg,
|
||||
)
|
||||
reject(
|
||||
new Error(
|
||||
res.msg,
|
||||
),
|
||||
)
|
||||
}
|
||||
} catch (error) {
|
||||
const errorMsg =
|
||||
error.message ||
|
||||
'操作失败,请稍后重试'
|
||||
console.error(
|
||||
errorMsg,
|
||||
'请求异常--',
|
||||
)
|
||||
reject(
|
||||
new Error(res.msg),
|
||||
new Error(errorMsg),
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue