作者 雷海东
@@ -24,17 +24,17 @@ @@ -24,17 +24,17 @@
24 </el-form> 24 </el-form>
25 25
26 <el-row :gutter="10" class="mb8"> 26 <el-row :gutter="10" class="mb8">
27 - <el-col :span="1.5">  
28 - <!-- <el-button 27 + <!--<el-col :span="1.5">
  28 + <el-button
29 type="primary" 29 type="primary"
30 plain 30 plain
31 icon="el-icon-plus" 31 icon="el-icon-plus"
32 size="mini" 32 size="mini"
33 @click="handleAdd" 33 @click="handleAdd"
34 v-hasPermi="['system:contract:add']" 34 v-hasPermi="['system:contract:add']"
35 - >新增</el-button> -->  
36 - </el-col>  
37 - <el-col :span="1.5"> 35 + >新增</el-button>
  36 + </el-col>-->
  37 + <!-- <el-col :span="1.5">
38 <el-button 38 <el-button
39 type="success" 39 type="success"
40 plain 40 plain
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 @click="handleUpdate" 44 @click="handleUpdate"
45 v-hasPermi="['system:contract:edit']" 45 v-hasPermi="['system:contract:edit']"
46 >修改</el-button> 46 >修改</el-button>
47 - </el-col> 47 + </el-col> -->
48 <el-col :span="1.5"> 48 <el-col :span="1.5">
49 <el-button 49 <el-button
50 type="danger" 50 type="danger"
@@ -71,47 +71,61 @@ @@ -71,47 +71,61 @@
71 71
72 <el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange"> 72 <el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange">
73 <el-table-column type="selection" width="55" align="center" /> 73 <el-table-column type="selection" width="55" align="center" />
74 - <el-table-column label="合同编号" align="center" prop="contractno" />  
75 - <el-table-column label="合同名称" align="center" prop="contractName" />  
76 - <el-table-column label="合同类型" align="center" prop="contractType" />  
77 - <el-table-column label="合同金额" align="center" prop="contractAmount" />  
78 - <el-table-column label="生效日期" align="center" prop="effectiveDate" > 74 + <el-table-column label="合同编号" align="center" prop="contractno" width="100"/>
  75 + <el-table-column label="合同名称" align="center" prop="contractName" width="200"/>
  76 + <el-table-column label="合同类型" align="center" prop="contractType" width="100"/>
  77 + <el-table-column label="合同金额" align="center" prop="contractAmount" width="100"/>
  78 + <el-table-column label="生效日期" align="center" prop="effectiveDate" width="100">
79 <template slot-scope="scope"> 79 <template slot-scope="scope">
80 <span>{{ parseTime(scope.row.effectiveDate, '{y}-{m}-{d}') }}</span> 80 <span>{{ parseTime(scope.row.effectiveDate, '{y}-{m}-{d}') }}</span>
81 </template> 81 </template>
82 </el-table-column> 82 </el-table-column>
83 - <el-table-column label="到期日期" align="center" prop="expirationDate" > 83 + <el-table-column label="到期日期" align="center" prop="expirationDate" width="100">
84 <template slot-scope="scope"> 84 <template slot-scope="scope">
85 <span>{{ parseTime(scope.row.expirationDate, '{y}-{m}-{d}') }}</span> 85 <span>{{ parseTime(scope.row.expirationDate, '{y}-{m}-{d}') }}</span>
86 </template> 86 </template>
87 </el-table-column> 87 </el-table-column>
88 - <el-table-column label="甲方" align="center" prop="partyA" />  
89 - <el-table-column label="乙方" align="center" prop="partyB" />  
90 - <el-table-column label="付款方式" align="center" prop="paymentMethod" />  
91 - <el-table-column label="签订日期" align="center" prop="signingDate" > 88 + <el-table-column label="甲方" align="center" prop="partyA" width="200"/>
  89 + <el-table-column label="乙方" align="center" prop="partyB" width="200"/>
  90 + <el-table-column label="付款方式" align="center" prop="paymentMethod" width="200"/>
  91 + <el-table-column label="签订日期" align="center" prop="signingDate" width="100">
92 <template slot-scope="scope"> 92 <template slot-scope="scope">
93 <span>{{ parseTime(scope.row.signingDate, '{y}-{m}-{d}') }}</span> 93 <span>{{ parseTime(scope.row.signingDate, '{y}-{m}-{d}') }}</span>
94 </template> 94 </template>
95 </el-table-column> 95 </el-table-column>
96 - <el-table-column label="标的物信息" align="center" prop="subjectInformation" />  
97 - <el-table-column label="附件" align="center" prop="attachments" />  
98 - <!-- <el-table-column label="" align="center" prop="id" v-if="true"/> -->  
99 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> 96 + <el-table-column label="标的物信息" align="center" prop="subjectInformation" width="200" />
  97 + <el-table-column label="附件" align="center" prop="attachments" width="100"/>
  98 + <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
100 <template slot-scope="scope"> 99 <template slot-scope="scope">
101 <el-button 100 <el-button
102 - size="mini"  
103 type="text" 101 type="text"
104 - icon="el-icon-edit"  
105 - @click="handleUpdate(scope.row)"  
106 - v-hasPermi="['system:contract:edit']"  
107 - >修改</el-button>  
108 - <el-button  
109 size="mini" 102 size="mini"
  103 + icon="el-icon-tickets"
  104 + @click="handleFlowRecord(scope.row)"
  105 + v-hasPermi="['workflow:process:query']"
  106 + >详情</el-button>
  107 + <el-button
110 type="text" 108 type="text"
  109 + size="mini"
111 icon="el-icon-delete" 110 icon="el-icon-delete"
112 @click="handleDelete(scope.row)" 111 @click="handleDelete(scope.row)"
113 - v-hasPermi="['system:contract:remove']" 112 + v-if="scope.row.finishTime"
  113 + v-hasPermi="['workflow:process:remove']"
114 >删除</el-button> 114 >删除</el-button>
  115 + <el-button
  116 + type="text"
  117 + size="mini"
  118 + icon="el-icon-circle-close"
  119 + @click="handleStop(scope.row)"
  120 + v-hasPermi="['workflow:process:cancel']"
  121 + >取消</el-button>
  122 + <el-button
  123 + type="text"
  124 + size="mini"
  125 + icon="el-icon-refresh-right"
  126 + v-hasPermi="['workflow:process:start']"
  127 + @click="handleAgain(scope.row)"
  128 + >重新发起</el-button>
115 </template> 129 </template>
116 </el-table-column> 130 </el-table-column>
117 </el-table> 131 </el-table>
@@ -175,17 +189,13 @@ @@ -175,17 +189,13 @@
175 <script> 189 <script>
176 import { listContract, getContract, delContract, addContract, updateContract } from "@/api/compliancemanagement/contract"; 190 import { listContract, getContract, delContract, addContract, updateContract } from "@/api/compliancemanagement/contract";
177 import FileUpload from '@/components/FileUpload'; 191 import FileUpload from '@/components/FileUpload';
178 -import { getToken } from "@/utils/auth";  
179 export default { 192 export default {
180 name: "Contract", 193 name: "Contract",
181 components: { 194 components: {
182 FileUpload 195 FileUpload
183 }, 196 },
184 -  
185 data() { 197 data() {
186 -  
187 return { 198 return {
188 -  
189 // 按钮loading 199 // 按钮loading
190 buttonLoading: false, 200 buttonLoading: false,
191 // 遮罩层 201 // 遮罩层
@@ -281,6 +291,7 @@ export default { @@ -281,6 +291,7 @@ export default {
281 this.contractList = response.rows; 291 this.contractList = response.rows;
282 this.total = response.total; 292 this.total = response.total;
283 this.loading = false; 293 this.loading = false;
  294 + console.log(this.contractList)
284 }); 295 });
285 }, 296 },
286 // 取消按钮 297 // 取消按钮
@@ -324,23 +335,23 @@ export default { @@ -324,23 +335,23 @@ export default {
324 this.multiple = !selection.length 335 this.multiple = !selection.length
325 }, 336 },
326 /** 新增按钮操作 */ 337 /** 新增按钮操作 */
327 - handleAdd() {  
328 - this.reset();  
329 - this.open = true;  
330 - this.title = "添加";  
331 - }, 338 + // handleAdd() {
  339 + // this.reset();
  340 + // this.open = true;
  341 + // this.title = "添加";
  342 + // },
332 /** 修改按钮操作 */ 343 /** 修改按钮操作 */
333 - handleUpdate(row) {  
334 - this.loading = true;  
335 - this.reset();  
336 - const id = row.id || this.ids  
337 - getContract(id).then(response => {  
338 - this.loading = false;  
339 - this.form = response.data;  
340 - this.open = true;  
341 - this.title = "修改";  
342 - });  
343 - }, 344 + // handleUpdate(row) {
  345 + // this.loading = true;
  346 + // this.reset();
  347 + // const id = row.id || this.ids
  348 + // getContract(id).then(response => {
  349 + // this.loading = false;
  350 + // this.form = response.data;
  351 + // this.open = true;
  352 + // this.title = "修改";
  353 + // });
  354 + // },
344 /** 提交按钮 */ 355 /** 提交按钮 */
345 submitForm() { 356 submitForm() {
346 this.$refs["form"].validate(valid => { 357 this.$refs["form"].validate(valid => {
@@ -387,6 +398,35 @@ export default { @@ -387,6 +398,35 @@ export default {
387 ...this.queryParams 398 ...this.queryParams
388 }, `contract_${new Date().getTime()}.xlsx`) 399 }, `contract_${new Date().getTime()}.xlsx`)
389 }, 400 },
  401 + /** 流程流转记录 */
  402 + handleFlowRecord(row) {
  403 + this.$router.push({
  404 + path: '/workflow/process/detail/' + row.procInsId,
  405 + query: {
  406 + processed: false
  407 + }
  408 + })
  409 + },
  410 + /** 取消流程申请 */
  411 + handleStop(row){
  412 + const params = {
  413 + procInsId: row.procInsId
  414 + }
  415 + stopProcess(params).then( res => {
  416 + this.$modal.msgSuccess(res.msg);
  417 + this.getList();
  418 + });
  419 + },
  420 + handleAgain(row) {
  421 + this.$router.push({
  422 + path: '/workflow/process/start/' + row.deployId,
  423 + query: {
  424 + definitionId: row.procDefId,
  425 + procInsId: row.procInsId
  426 + }
  427 + })
  428 + console.log(row);
  429 + },
390 } 430 }
391 }; 431 };
392 </script> 432 </script>
@@ -78,7 +78,7 @@ export default { @@ -78,7 +78,7 @@ export default {
78 startProcess(this.definitionId, JSON.stringify(data.valData)).then(res => { 78 startProcess(this.definitionId, JSON.stringify(data.valData)).then(res => {
79 this.$modal.msgSuccess(res.msg); 79 this.$modal.msgSuccess(res.msg);
80 this.$tab.closeOpenPage({ 80 this.$tab.closeOpenPage({
81 - path: '/work/own' 81 + path: '/technologicalprocess/work/own'
82 }) 82 })
83 }) 83 })
84 } 84 }