刘恒 1 год назад
Родитель
Сommit
d3ce783e69

+ 10 - 0
src/http/moudules/contract.js

@@ -99,4 +99,14 @@ export const supplierContractPage = (data) => {
     })
 }
 
+//失效
+export const statusUpdate = (data) => {
+    return axios({
+        url: '/fnc/contract/update',
+        method: 'post',
+        data
+    })
+}
+
+
 

+ 15 - 2
src/views/FinancialManagement/ContractManagement/ContractManagement.vue

@@ -166,6 +166,18 @@
           </div>
         </template>
       </el-table-column>
+      <el-table-column prop="contractName" label="合同状态">
+        <template slot-scope="scope">
+          {{
+            scope.row.contractStatus == "1"
+              ? "失效"
+              : scope.row.contractStatus == "0"
+              ? "有效"
+              : ""
+          }}
+        </template>
+      </el-table-column>
+
       <el-table-column prop="externalCompaniesName" label="甲方" width="230">
       </el-table-column>
       <el-table-column prop="internalCompanyName" label="乙方" width="230">
@@ -450,6 +462,7 @@
                 :multiple="true"
                 @select="handleSelect"
                 :children-as-objects="true"
+                flat
               ></treeselect>
             </el-form-item>
           </el-col>
@@ -1071,7 +1084,7 @@ export default {
       formInline: {
         contractCode: "",
         // contractName: "",
-        contractStatus: "",
+        contractStatus: "all",
         contractType: "",
         externalCompaniesId: "",
         internalCompanyId: "",
@@ -1348,7 +1361,7 @@ export default {
                   type: "warning",
                 }).then(() => {
                   this.$api.contract
-                    .constractSave({ id: row.id, contractStatus: 1 })
+                    .statusUpdate({ id: row.id, contractStatus: 1 })
                     .then((res) => {
                       if (res.code == 200) {
                         this.$message.success(res.msg);