|
@@ -10,125 +10,51 @@
|
|
|
:title="title"
|
|
|
:modal-append-to-body="false"
|
|
|
style="text-align: left"
|
|
|
+ width="70%"
|
|
|
@close="closeDialog"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <div class="user-panel" v-loading="loading">
|
|
|
- <el-form
|
|
|
- ref="form"
|
|
|
- :model="formModel"
|
|
|
- :rules="ruleValidate"
|
|
|
- :label-width="'100px'"
|
|
|
- >
|
|
|
- <el-form-item label="工作流程" prop="workflowDetailId">
|
|
|
- <el-input
|
|
|
- v-model="formModel.workflowDetailId"
|
|
|
- placeholder="请输入工作流程"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="合同ID" prop="contractId">
|
|
|
- <el-input
|
|
|
- v-model="formModel.contractId"
|
|
|
- placeholder="请输入合同ID"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="名称" prop="name">
|
|
|
- <el-input
|
|
|
- v-model="formModel.name"
|
|
|
- placeholder="请输入名称"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="描述" prop="description">
|
|
|
- <el-input
|
|
|
- v-model="formModel.description"
|
|
|
- placeholder="请输入描述"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="完成度" prop="completionDegree">
|
|
|
- <el-input
|
|
|
- v-model="formModel.completionDegree"
|
|
|
- placeholder="请输入完成度"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item
|
|
|
- label="审核状态"
|
|
|
- prop="state"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="formModel.state"
|
|
|
- placeholder="请输入审核状态"
|
|
|
- style="width: 300px"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <div class="user-panel">
|
|
|
+ <el-steps :active="workflowStepCount" align-center>
|
|
|
+ <el-step v-for="workflowStep in workflowStepData" :key="workflowStep.value" :title="workflowStep.userName" :description="workflowStep.opinion"></el-step>
|
|
|
+ </el-steps>
|
|
|
+ </div>
|
|
|
+ <div class="user-panel">
|
|
|
+ <el-table :data="compareResultsData" height="300" style="width: 100%" stripe>
|
|
|
+ <el-table-column prop="contractCode" label="合同编号" width="150px"></el-table-column>
|
|
|
+ <el-table-column prop="item" label="项目名称" width="250px"></el-table-column>
|
|
|
+ <el-table-column prop="result" label="结果">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span v-html="row.result"></span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="user-panel">
|
|
|
+ <el-input type="textarea" :rows="4" v-model="opinion" placeholder="请输入意见"></el-input>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="success" @click="handleSubmit">通 过</el-button>
|
|
|
+ <el-button type="danger" @click="handleReject">驳 回</el-button>
|
|
|
<el-button @click="closeDialog">取 消</el-button>
|
|
|
- <el-button type="primary" @click="handleSubmit" :loading="submitting"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
<script>
|
|
|
import Constant from "@/constant";
|
|
|
import auditingApi from "@/api/base/auditing";
|
|
|
+import purBillVouchApi from "@/api/base/purBillVouch";
|
|
|
+import auditingStepApi from "@/api/base/auditingStep";
|
|
|
|
|
|
export default {
|
|
|
props: ["businessKey", "title"],
|
|
|
data() {
|
|
|
return {
|
|
|
- formModel: {},
|
|
|
- ruleValidate: {
|
|
|
- id: [{ required: true, message: "编号不能为空", trigger: "blur" }],
|
|
|
- workflowDetailId: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: "工作流程详情编号不能为空",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
- contractId: [
|
|
|
- { required: true, message: "合同ID不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
|
|
- description: [
|
|
|
- { required: true, message: "描述不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- completionDegree: [
|
|
|
- { required: true, message: "完成度不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- state: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: "状态(0-审核失败 1-审核中 2-审核完成)不能为空",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
- delFlag: [
|
|
|
- { required: true, message: "是否删除不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- createBy: [
|
|
|
- { required: true, message: "创建人不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- createTime: [
|
|
|
- { required: true, message: "创建时间不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- updateBy: [
|
|
|
- { required: true, message: "更新人不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- updateTime: [
|
|
|
- { required: true, message: "更新时间不能为空", trigger: "blur" },
|
|
|
- ],
|
|
|
- },
|
|
|
showDialog: true,
|
|
|
- loading: false,
|
|
|
- submitting: false,
|
|
|
+ compareResultsData: [],
|
|
|
+ workflowStepData: [],
|
|
|
+ workflowStepCount: 0,
|
|
|
+ opinion: "",
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -137,63 +63,80 @@ export default {
|
|
|
},
|
|
|
handleSubmit() {
|
|
|
var self = this;
|
|
|
+
|
|
|
+ var formData = new FormData();
|
|
|
+ formData.append("invoiceId", self.businessKey);
|
|
|
+ formData.append("opinion", self.opinion);
|
|
|
+ auditingStepApi
|
|
|
+ .auditingStepNext(formData)
|
|
|
+ .then(function (response) {
|
|
|
+ var jsonData = response.data;
|
|
|
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- (function () {
|
|
|
- var id = self.formModel.id;
|
|
|
-
|
|
|
- if (id == null || id.length == 0) {
|
|
|
- return auditingApi.add(self.formModel);
|
|
|
- } else {
|
|
|
- return auditingApi.update(self.formModel);
|
|
|
- }
|
|
|
- })().then(function (response) {
|
|
|
- var jsonData = response.data;
|
|
|
-
|
|
|
- if (jsonData.result) {
|
|
|
- self.$message({
|
|
|
- message: "保存成功!",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
-
|
|
|
- self.$emit("close", true);
|
|
|
- } else {
|
|
|
- self.$message({
|
|
|
- message: jsonData.message + "",
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
-
|
|
|
- self.$emit("close", false);
|
|
|
- }
|
|
|
- });
|
|
|
+ if (jsonData.result) {
|
|
|
+ self.$message({message: "提交成功!", type: "success"});
|
|
|
+ self.$emit("close", true);
|
|
|
+ } else {
|
|
|
+ self.$message({message: jsonData.message + "",type: "warning"});
|
|
|
+ self.$emit("close", false);
|
|
|
}
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ // self.$message.error(error + "");
|
|
|
});
|
|
|
},
|
|
|
- },
|
|
|
- mounted: function () {
|
|
|
- var self = this;
|
|
|
-
|
|
|
- (function () {
|
|
|
- if (self.businessKey.length == 0) {
|
|
|
- return auditingApi.create();
|
|
|
- } else {
|
|
|
- return auditingApi.edit(self.businessKey);
|
|
|
- }
|
|
|
- })()
|
|
|
- .then((response) => {
|
|
|
+ handleReject() {
|
|
|
+ var self = this;
|
|
|
+
|
|
|
+ var formData = new FormData();
|
|
|
+ formData.append("invoiceId", self.businessKey);
|
|
|
+ formData.append("opinion", self.opinion);
|
|
|
+ auditingStepApi
|
|
|
+ .auditingStepReject(formData)
|
|
|
+ .then(function (response) {
|
|
|
var jsonData = response.data;
|
|
|
- self.loading = false;
|
|
|
|
|
|
if (jsonData.result) {
|
|
|
- self.formModel = jsonData.data;
|
|
|
+ self.$message({message: "驳回成功!", type: "success"});
|
|
|
+ self.$emit("close", true);
|
|
|
} else {
|
|
|
- self.$message.error(jsonData.message + "");
|
|
|
+ self.$message({message: jsonData.message + "",type: "warning"});
|
|
|
+ self.$emit("close", false);
|
|
|
}
|
|
|
})
|
|
|
.catch((error) => {
|
|
|
- self.$message.error(error + "");
|
|
|
+ // self.$message.error(error + "");
|
|
|
});
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted: function () {
|
|
|
+ var self = this;
|
|
|
+
|
|
|
+ //审批流程图
|
|
|
+ var parameters = new FormData();
|
|
|
+ parameters.append("invoiceId", self.businessKey);
|
|
|
+ auditingStepApi
|
|
|
+ .auditingStepData(parameters)
|
|
|
+ .then(function (response) {
|
|
|
+ var jsonData = response.data.data;
|
|
|
+ self.workflowStepData = jsonData.list;
|
|
|
+ self.workflowStepCount = jsonData.count;
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ // self.$message.error(error + "");
|
|
|
+ });
|
|
|
+
|
|
|
+ //对比数据
|
|
|
+ var formData = new FormData();
|
|
|
+ formData.append("PBVID", self.businessKey);
|
|
|
+ purBillVouchApi
|
|
|
+ .compareResults(formData)
|
|
|
+ .then(function (response) {
|
|
|
+ var jsonData = response.data.data;
|
|
|
+ self.compareResultsData = jsonData;
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ // self.$message.error(error + "");
|
|
|
+ });
|
|
|
},
|
|
|
};
|
|
|
</script>
|