18513069273 há 4 anos atrás
pai
commit
b3bdc6749e

+ 2 - 0
src/api/V2/contract/index.js

@@ -14,4 +14,6 @@ export const API_POST_CUSTOM_DOWN_DELETE = '/customDropDown/api/saveDelete'
 export const API_POST_EXPORT = '/contractManagementInfo/export'
 // 操作历史
 export const API_POST_BILL_OPERATE_HIS = '/billOperateHis/query/commonBillOperateHis'
+// 修改当前状态
+export const API_POST_EDITSTATUS = '/contractManagementInfo/editStatus'
 

+ 6 - 3
src/model/contarct/index.js

@@ -9,13 +9,14 @@ import {
     API_POST_CUSTOM_DOWN_EDIT,
     API_POST_CUSTOM_DOWN_DELETE,
     API_POST_EXPORT,
-    API_POST_BILL_OPERATE_HIS
+    API_GET_BILL_OPERATE_HIS,
+    API_POST_EDITSTATUS
 } from '@/api/V2/contract'
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
 // 添加
 export const addList = appRx.post(API_POST_ADD_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
-// 下拉
+// 查看数据或包装方式
 export const packList = appRx.get(API_POST_MANNER_OF_PACKING_TENANT, errorCatcher, errorHandle, filter)
 // 下拉
 export const xiala = appRx.get(API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN, errorCatcher, errorHandle, filter)
@@ -25,4 +26,6 @@ export const delxiala = appRx.post(API_POST_CUSTOM_DOWN_DELETE, errorCatcher, er
 // 导出
 export const export1 = appRx.get(API_POST_EXPORT)
 // 操作历史
-export const billoperatehis = appRx.get(API_POST_BILL_OPERATE_HIS, errorCatcher, errorHandle, filter)
+export const billoperatehis = appRx.get(API_GET_BILL_OPERATE_HIS, errorCatcher, errorHandle, filter)
+// 修改状态
+export const editstatus = appRx.post(API_POST_EDITSTATUS, errorCatcher, errorHandle, filter)

+ 118 - 12
src/views/contractManagement/purchaseContract.vue

@@ -22,10 +22,11 @@
       </template>
       <template slot="right">
         <ws-select
-          v-model="deptBudgetList.crtDutyId"
+          v-model="searchTypeText"
           placeholder=""
           class="typeselect"
           @change="selecttaskType"
+          :value="searchType"
         >
           <ws-option
             v-for="item in taskTypeList"
@@ -76,7 +77,7 @@
       :data="contractList.records"
       style="width: 100%; margin-top: 10px"
     >
-      <el-table-column type="index" />
+      <el-table-column type="index" label="序号" />
       <el-table-column prop="contractNo" label="合同编号" width="80">
       </el-table-column>
       <el-table-column prop="goodsName" label="货名" width="80">
@@ -92,8 +93,32 @@
       </el-table-column>
       <el-table-column prop="status" label="状态">
         <template slot-scope="scope">
-          <span>{{ scope.row.status }}</span>
-          <i class="el-icon-edit" @click.stop="editClick(item, index)"></i>
+          <el-popover
+            placement="left"
+            :width="400"
+            trigger="click"
+            @show="history(scope.row)"
+          >
+            <template #reference>
+              <span>{{ scope.row.status }}</span>
+            </template>
+            <div>
+              <p>操作历史</p>
+              <div v-for="(item, index) in historyList">
+                <div class="vertical-circle"></div>
+                <div class="vertical-text">
+                  {{ item.operateUser }}{{ item.dealMsg }}<br />{{
+                    item.updateDate
+                  }}
+                </div>
+                <div
+                  v-if="index != historyList.length - 1"
+                  class="vertical-line"
+                ></div>
+              </div>
+            </div>
+          </el-popover>
+          <i class="el-icon-edit" @click="editClick(scope.row)"></i>
         </template>
       </el-table-column>
       <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
@@ -121,6 +146,7 @@
         </template>
       </el-table-column>
     </el-table>
+
     <!-- 附件弹框 -->
     <!-- <WinseaContentModal
       v-model="accessoryTFs"
@@ -145,9 +171,14 @@
   </div>
 </template>
 <script>
-import { getList, export1 } from '@/model/contarct/index'
+import {
+  getList,
+  export1,
+  editstatus,
+  billoperatehis,
+} from '@/model/contarct/index'
 import { downloadFile } from '@/utils/batchDown'
-import { dayjs, fmoney } from 'base-core-lib'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   watch: {
@@ -174,7 +205,9 @@ export default {
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
+      searchTypeText: '未完成',
       searchKeyWord: '',
+      contractType: 2,
       startDate: null,
       endDate: null,
       // 提交类型
@@ -185,6 +218,7 @@ export default {
       },
       contractList: [],
       deptBudgetList: {},
+      historyList: [],
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()
@@ -192,14 +226,13 @@ export default {
       },
       accessoryTFs: false,
       taskTypeList: [
-        { value: '未完成(默认)', type: 1 },
+        { value: '未完成', type: 1 },
         { value: '已完成', type: 2 },
-        { value: '待回款', type: 3 },
         { value: '全部合同', type: '' },
       ],
     }
   },
-  created() {
+  mounted() {
     //cg.viewBudget
     //cg.viewSpareMoney
     // this.getVesselData();
@@ -210,6 +243,7 @@ export default {
     getList() {
       getList({
         compId: sessionStorage.getItem('ws-pf_compId'),
+        contractType: this.contractType,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
@@ -222,6 +256,36 @@ export default {
           this.contractList = response
         })
     },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待执行' || row.status == '已完成') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      this.$confirm(`是否将状态改为${status}`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editstatus({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
         if (this.taskTypeList[i].value == e) {
@@ -244,7 +308,11 @@ export default {
       this.appendixIdss = row.receiveAttachmentPath
     },
     handleExamine(row) {
-      this.$router.push({ path: 'purchaseContractExamine' })
+      console.log(row)
+      this.$router.push({
+        name: 'purchaseContractExamine',
+        params: { id: row.id },
+      })
     },
     handleAdd() {
       this.$router.push({ path: 'purchaseContractAdd' })
@@ -256,11 +324,22 @@ export default {
     handleClose() {
       this.dialogViewSpareMoney = false
     },
-    find() {},
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      this.getList()
+    },
     async exportlist() {
       const { data } = await export1(
         {
           compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
           currentPage: this.currentPage,
           pageSize: this.pageSize,
           searchType: this.searchType,
@@ -283,6 +362,34 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
+.vertical-line {
+  height: 100px;
+  border-left: 2px solid;
+  margin-left: 4px;
+  // border-image: -webkit-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: -moz-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: linear-gradient(#00eba7, #08b8e6) 30 30;
+}
+
+.vertical-circle {
+  float: left;
+  width: 10px;
+  height: 10px;
+  border: 2px solid white;
+  background-color: #08b8e6;
+  -webkit-border-radius: 100px;
+}
+.vertical-circle:first-child {
+  color: red;
+}
+.vertical-text {
+  float: left;
+  margin-top: -7px;
+}
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  text-align: center;
+}
 .typeselect {
   width: 500px;
 }
@@ -315,7 +422,6 @@ export default {
     margin: 10px 20px;
     cursor: pointer;
     font-size: 14px;
-
     p {
       margin: 8px 0px;
       span {

+ 67 - 4
src/views/contractManagement/purchaseContractExamine.vue

@@ -272,7 +272,14 @@
   </div>
 </template>
 <script>
-import { getVesselOne } from '@/model/procurement/basic'
+import {
+  packList,
+  addList,
+  xiala,
+  addxiala,
+  editxiala,
+  delxiala,
+} from '@/model/contarct/index'
 import { dayjs } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
@@ -303,15 +310,71 @@ export default {
       ruleDeptBudget: [],
       deptBudgetList: {},
       mainReportAdd: {},
+      list: {},
     }
   },
+
   created() {
-    //cg.viewBudget
-    //cg.viewSpareMoney
-    // this.getVesselData();
+    this.loaddata()
     this.showType = this.isShow
   },
   methods: {
+    loaddata() {
+      console.log(this.$route)
+      // 数据
+      packList({ id: this.$route.params.id })
+        .toPromise()
+        .then((response) => {
+          this.list = response
+        })
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 双章
+      packList({ constId: 'CON4' })
+        .toPromise()
+        .then((response) => {
+          this.ChapterTwoList = response
+        })
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleClose() {
       this.dialogViewSpareMoney = false