소스 검색

feature(招标): 1、招标闭环功能实现(钉钉审批缺少工作流,暂未完成)
2、招标超期功能实现,超过2个月没有创建项目以及没有申请闭环的招投标进入已超期
3、首页增加数值统计:当月新增招标信息、项目来源为招标信息转化

lk 2 년 전
부모
커밋
2e9e6f643d

+ 3 - 0
src/api/customer/bid.js

@@ -17,4 +17,7 @@ export default {
   list(query) {
     return micro_request.postRequest(basePath, 'CustCustomerBidRecord', 'List', query)
   },
+  closeLoop(query) {
+    return micro_request.postRequest(basePath, 'CustCustomerBidRecord', 'CloseLoop', query)
+  },
 }

+ 6 - 6
src/views/contract/components/ApplyContract.vue

@@ -47,8 +47,7 @@
             (response, file) => {
               return setFile(response, file, index)
             }
-          "
-        >
+          ">
           <el-button size="mini" type="primary">点击上传</el-button>
         </el-upload>
       </el-form-item>
@@ -118,8 +117,8 @@
         return true
       },
       removeFile(file, list, index) {
-        this.form.fileName = ""
-        this.form.fileUrl = ""
+        this.form.fileName = ''
+        this.form.fileUrl = ''
       },
       async handleSubmit() {
         const [valid] = await to(this.$refs.form.validate())
@@ -129,7 +128,8 @@
         // if (err) return
 
         this.loading = true
-        contractApi.commitWithFileUrl(this.form)
+        contractApi
+          .commitWithFileUrl(this.form)
           .then((res) => {
             if (res.code == 200) {
               this.$message.success('提交成功')
@@ -139,7 +139,7 @@
               this.$message.success('系统异常')
               console.error(res)
             }
-          this.loading = false
+            this.loading = false
           })
           .catch((err) => {
             console.error(err)

+ 41 - 3
src/views/customer/detail.vue

@@ -324,11 +324,28 @@
               </el-table-column>
               <el-table-column align="center" label="中标单位" prop="bidder" width="120px" />
               <el-table-column align="center" label="创建招标日期" prop="biddingTime" width="160px" />
+              <el-table-column align="center" label="闭环信息描述" prop="closeLoopMsg" width="120px" />
               <el-table-column align="center" label="备注" prop="remark" width="120px" />
-              <el-table-column align="center" fixed="right" label="操作" width="90px">
+              <el-table-column align="center" fixed="right" label="操作" width="120px">
                 <template slot-scope="scope">
-                  <el-button type="text" @click="bidEdit(scope.row)">编辑</el-button>
-                  <el-button type="text" @click="bidDel(scope.row)">删除</el-button>
+                  <el-button
+                    v-if="scope.row.status == '10' || scope.row.status == '40'"
+                    type="text"
+                    @click="bidEdit(scope.row)">
+                    编辑
+                  </el-button>
+                  <el-button
+                    v-if="scope.row.status == '10' || scope.row.status == '40'"
+                    type="text"
+                    @click="bidDel(scope.row)">
+                    删除
+                  </el-button>
+                  <el-button
+                    v-if="scope.row.status == '10' || scope.row.status == '40'"
+                    type="text"
+                    @click="closeLoop(scope.row)">
+                    闭环
+                  </el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -689,6 +706,27 @@
           })
           .catch(() => {})
       },
+      // 闭环
+      closeLoop(row) {
+        this.$prompt('确定闭环该招标信息吗', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+        })
+          .then(async ({ value }) => {
+            // 当用户点击确定按钮时,执行的逻辑
+            console.log('输入的值为:', value)
+            const [err, res] = await to(bidApi.closeLoop({ id: row.id, closeLoopMsg: value }))
+            if (err) return
+            if (res.code == 200) {
+              this.$baseMessage(res.msg, 'success', 'vab-hey-message-success')
+              this.handleClick({ name: 'bid' })
+            }
+          })
+          .catch(() => {
+            // 当用户点击取消按钮时,执行的逻辑
+            // console.log('取消输入')
+          })
+      },
       // 保存联系人
       contactSave() {
         this.handleClick({ name: 'contact' })

+ 51 - 4
src/views/customer/inviteTenders/index.vue

@@ -100,13 +100,33 @@
               <span v-else>{{ row[item.prop] }}</span>
             </template>
           </el-table-column>
-          <el-table-column align="center" fixed="right" label="操作" width="150px">
+          <el-table-column align="center" fixed="right" label="操作" width="180px">
             <template slot-scope="scope">
-              <el-button type="text" @click="bidEdit(scope.row)">编辑</el-button>
-              <el-button type="text" @click="bidDel(scope.row)">删除</el-button>
-              <el-button v-permissions="['proj:business:add']" type="text" @click="addProjBusiness(scope.row)">
+              <el-button
+                v-if="scope.row.status == '10' || scope.row.status == '40'"
+                type="text"
+                @click="bidEdit(scope.row)">
+                编辑
+              </el-button>
+              <el-button
+                v-if="scope.row.status == '10' || scope.row.status == '40'"
+                type="text"
+                @click="bidDel(scope.row)">
+                删除
+              </el-button>
+              <el-button
+                v-if="scope.row.status == '10' || scope.row.status == '40'"
+                v-permissions="['proj:business:add']"
+                type="text"
+                @click="addProjBusiness(scope.row)">
                 新增项目
               </el-button>
+              <el-button
+                v-if="scope.row.status == '10' || scope.row.status == '40'"
+                type="text"
+                @click="closeLoop(scope.row)">
+                闭环
+              </el-button>
             </template>
           </el-table-column>
           <template #empty>
@@ -223,6 +243,12 @@
             prop: 'biddingTime',
             sortable: false,
           },
+          {
+            label: '闭环信息描述',
+            width: 'auto',
+            prop: 'closeLoopMsg',
+            sortable: false,
+          },
           {
             label: '备注',
             width: 'auto',
@@ -260,6 +286,27 @@
       this.getUserSalesProvince()
     },
     methods: {
+      // 闭环
+      closeLoop(row) {
+        this.$prompt('确定闭环该招标信息吗', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+        })
+          .then(async ({ value }) => {
+            // 当用户点击确定按钮时,执行的逻辑
+            console.log('输入的值为:', value)
+            const [err, res] = await to(bidApi.closeLoop({ id: row.id, closeLoopMsg: value }))
+            if (err) return
+            if (res.code == 200) {
+              this.$baseMessage(res.msg, 'success', 'vab-hey-message-success')
+              this.fetchData()
+            }
+          })
+          .catch(() => {
+            // 当用户点击取消按钮时,执行的逻辑
+            // console.log('取消输入')
+          })
+      },
       // 新建经销商
       addDistributor() {
         this.$refs['addDistributor'].showEdit()

+ 3 - 1
src/views/proj/business/index.vue

@@ -606,7 +606,9 @@
           this.queryForm.endTime = undefined
         }
         this.listLoading = true
-        this.queryForm.provinceId = this.queryForm.custProvince.id
+        if (this.queryForm.custProvince) {
+          this.queryForm.provinceId = this.queryForm.custProvince.id
+        }
         const { data } = await businessApi.getList(this.queryForm)
         const { list, total } = data
         this.list = list