|
|
@@ -69,8 +69,7 @@
|
|
|
</block>
|
|
|
</view>
|
|
|
|
|
|
- <up-form-item v-if="workpresetjson.confirm != 0"
|
|
|
- label="确认信息" prop="confirm"
|
|
|
+ <up-form-item v-if="workpresetjson.confirm != 0" label="确认信息" prop="confirm"
|
|
|
:required="workpresetjson.confirm == 11">
|
|
|
<view class="options-box">
|
|
|
<view class="option" :class="form.confirm == item ? 'active' : ''"
|
|
|
@@ -492,17 +491,22 @@ async function save() {
|
|
|
}).then(res => {
|
|
|
loading.value = false;
|
|
|
console.log("保存工单", res);
|
|
|
- if (res.code == 1) {
|
|
|
- loading.value = true;
|
|
|
- upload.value.saveFileLinks('sa_workorder_node', data.sa_workorder_nodeid).then((s) => {
|
|
|
- loading.value = false;
|
|
|
- })
|
|
|
- formModified.value = false;
|
|
|
- uni.navigateBack()
|
|
|
- }
|
|
|
- setTimeout(() => {
|
|
|
- uni.showToast({ title: res.code !== 1 ? res.msg : "保存成功", icon: 'none' });
|
|
|
- }, 500);
|
|
|
+ if (res.code != 1) return wx.showModal({
|
|
|
+ title: '保存失败',
|
|
|
+ content: res.msg,
|
|
|
+ showCancel: false
|
|
|
+ });
|
|
|
+ loading.value = true;
|
|
|
+ upload.value.saveFileLinks('sa_workorder_node', data.sa_workorder_nodeid).then((s) => {
|
|
|
+ loading.value = false;
|
|
|
+ })
|
|
|
+ formModified.value = false;
|
|
|
+ uni.navigateBack({
|
|
|
+ success: () => {
|
|
|
+ $Http.getDetail && $Http.getDetail()
|
|
|
+ uni.showToast({ title: res.code !== 1 ? res.msg : "保存成功", icon: 'none' });
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
|