|
@@ -133,7 +133,13 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<uni-popup ref="exePopup" type="dialog">
|
|
<uni-popup ref="exePopup" type="dialog">
|
|
- <uni-popup-dialog title="转执行" type="info" before-close>
|
|
|
|
|
|
+ <uni-popup-dialog
|
|
|
|
+ title="转执行"
|
|
|
|
+ type="info"
|
|
|
|
+ @confirm="submitExecute"
|
|
|
|
+ @close="onCancel"
|
|
|
|
+ before-close
|
|
|
|
+ >
|
|
<uni-forms
|
|
<uni-forms
|
|
ref="exe"
|
|
ref="exe"
|
|
:modelValue="formData"
|
|
:modelValue="formData"
|
|
@@ -148,6 +154,15 @@
|
|
@change="changeManager"
|
|
@change="changeManager"
|
|
/>
|
|
/>
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
|
|
+ <uni-forms-item required label="合同状态:" name="contract">
|
|
|
|
+ <picker
|
|
|
|
+ @change="changeContract"
|
|
|
|
+ :range="contracts"
|
|
|
|
+ :value="formData.contract"
|
|
|
|
+ >
|
|
|
|
+ <view class="select">{{ contracts[formData.contract] }}</view>
|
|
|
|
+ </picker>
|
|
|
|
+ </uni-forms-item>
|
|
</uni-forms>
|
|
</uni-forms>
|
|
</uni-popup-dialog>
|
|
</uni-popup-dialog>
|
|
</uni-popup>
|
|
</uni-popup>
|
|
@@ -216,7 +231,10 @@ import {
|
|
startWarranty,
|
|
startWarranty,
|
|
startOperate,
|
|
startOperate,
|
|
} from "@/services/project";
|
|
} from "@/services/project";
|
|
|
|
+import uniFormsItem from "../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue";
|
|
|
|
+const contracts = ["无合同", "有合同"];
|
|
export default {
|
|
export default {
|
|
|
|
+ components: { uniFormsItem },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
auth: false,
|
|
auth: false,
|
|
@@ -225,14 +243,18 @@ export default {
|
|
depRole: [],
|
|
depRole: [],
|
|
user: {},
|
|
user: {},
|
|
manager: "",
|
|
manager: "",
|
|
|
|
+ contracts,
|
|
formData: {
|
|
formData: {
|
|
manager: "",
|
|
manager: "",
|
|
- contract: 0,
|
|
|
|
|
|
+ contract: null,
|
|
},
|
|
},
|
|
exeRules: {
|
|
exeRules: {
|
|
manager: {
|
|
manager: {
|
|
rules: [{ required: true, errorMessage: "请选择质保经理" }],
|
|
rules: [{ required: true, errorMessage: "请选择质保经理" }],
|
|
},
|
|
},
|
|
|
|
+ contract: {
|
|
|
|
+ rules: [{ required: true, errorMessage: "请选择合同状态" }],
|
|
|
|
+ },
|
|
},
|
|
},
|
|
wtyRules: {
|
|
wtyRules: {
|
|
manager: {
|
|
manager: {
|
|
@@ -501,6 +523,33 @@ export default {
|
|
onExecute() {
|
|
onExecute() {
|
|
this.$refs.exePopup.open();
|
|
this.$refs.exePopup.open();
|
|
},
|
|
},
|
|
|
|
+ changeContract(e) {
|
|
|
|
+ this.formData.contract = e.detail.value;
|
|
|
|
+ },
|
|
|
|
+ async submitExecute() {
|
|
|
|
+ this.$refs.exe.validate(async (err) => {
|
|
|
|
+ if (!err) {
|
|
|
|
+ const [dep_id, manager_id] = this.formData.manager.split("-");
|
|
|
|
+ let payload = {
|
|
|
|
+ project_code_id: this.currentProject.id,
|
|
|
|
+ with_contract: Number(this.formData.contract),
|
|
|
|
+ dep_id: Number(dep_id),
|
|
|
|
+ exe_manager_id: Number(manager_id),
|
|
|
|
+ };
|
|
|
|
+ await startExecution(payload);
|
|
|
|
+ this.$refs.exePopup.close();
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "转执行送审成功",
|
|
|
|
+ });
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ uni.hideToast();
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: "./list",
|
|
|
|
+ });
|
|
|
|
+ }, 1800);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
onWarranty() {
|
|
onWarranty() {
|
|
this.$refs.wtyPopup.open();
|
|
this.$refs.wtyPopup.open();
|
|
},
|
|
},
|
|
@@ -557,6 +606,10 @@ export default {
|
|
this.$refs.exePopup.close();
|
|
this.$refs.exePopup.close();
|
|
this.$refs.wtyPopup.close();
|
|
this.$refs.wtyPopup.close();
|
|
this.$refs.optPopup.close();
|
|
this.$refs.optPopup.close();
|
|
|
|
+ this.formData = {
|
|
|
|
+ manager: "",
|
|
|
|
+ contract: null,
|
|
|
|
+ };
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
@@ -592,6 +645,13 @@ export default {
|
|
width: 70%;
|
|
width: 70%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.select {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 72rpx;
|
|
|
|
+ line-height: 70rpx;
|
|
|
|
+ border: 1px solid #666;
|
|
|
|
+ padding-left: 20rpx;
|
|
|
|
+}
|
|
::v-deep {
|
|
::v-deep {
|
|
.uni-steps__column-title {
|
|
.uni-steps__column-title {
|
|
font-size: 18px;
|
|
font-size: 18px;
|