浏览代码

feat:需求订单管理

snow 1 年之前
父节点
当前提交
c3f47376ac

+ 19 - 6
src/apis/service/customerService/demandOrder/index.js

@@ -1,19 +1,32 @@
 // 物业管理员
 import http from "@/apis/axios";
-const api = "admin/";
+const api = "admin/order/";
+
+const planAPI = 'admin/planOrder/'
 export default {
+   // 分页查询
+  list: (data, params) => http(api + "orderlist", data, "post", params),
   // 详情
-  detail: (data, params) => http(api + "bragaininfo", data, "post", params),
+  detail: (data, params) => http(api + "orderinfo", data, "post", params),
+  //申请预付
+  prepayApply: (data, params) => http(api + "prepayapply", data, "post", params),
+  //需求订单状态
+  checkNode: (data, params) => http(api + "checknode", data, "post", params),
+
+
+  //预算函列表
+  planList:(data, params) => http(planAPI + 'list', data, 'post', params),
+  //预算函创建
+  planCreate:(data, params) => http(planAPI + 'create', data, 'post', params),
+  //选择预算函
+  planCheck: (data, params) => http(planAPI + "check", data, "post", params),
+
   // 更新
   update: (data, params) => http(api + "zxedit", data, "post", params),
   // 修改状态
   status: (data, params) => http(api + "bragainstatus", data, "post", params),
   // 分页查询 反馈列表
   feedList: (data, params) => http(api + "consultbidlist", data, "post", params),
- // 分页查询
- list: (data, params) => http(api + "bargainlist", data, "post", params),
-
-
   // 添加
   add: (data, params) => http(api + "consultcreate", data, "post", params),
   // 分页查询项目列表

+ 11 - 3
src/apis/service/customerService/workbench/index.js

@@ -1,11 +1,19 @@
 // 企业客户/供应商账号相关
 import http from '@/apis/axios'
-const api = 'admin/'
+const api = 'admin/order/'
+
+const planAPI = 'admin/planOrder/'
 export default {
   // 列表1
-  list: (data, params) => http(api + 'crontablist', data, 'post', params),
+  list: (data, params) => http(api + 'orderlist', data, 'post', params),
   // 任务详情
-  detail: (data, params) => http(api + 'consultzxinfo', data, 'post', params),
+  detail: (data, params) => http(api + 'orderinfo', data, 'post', params),
+
+  //预算函列表
+  planList:(data, params) => http(planAPI + 'list', data, 'post', params),
+  //预算函创建
+  planCreate:(data, params) => http(planAPI + 'create', data, 'post', params),
+
   // 采返商品详情
   good_detail: (data, params) =>
     http(api + 'consultfeadinfo', data, 'post', params),

+ 23 - 0
src/assets/js/statusList.js

@@ -1,3 +1,26 @@
+export const demandStatusOptions = [
+  {value:'1',label:'待供应商反馈评估预算函'},
+  {value:'2',label:'待供应商上传活动方案'},
+  {value:'3',label:'待供应商上传计划函'},
+  {value:'4',label:'待客户上传确认执行凭证'},
+  {value:'5',label:'待平台审批执行凭证'},
+  {value:'6',label:'待供应商确认已执行'},
+  {value:'7',label:'待客户确认已执行'},
+  {value:'8',label:'平台驳回执行凭证'},
+  {value:'9',label:'待供应商上传结算函'},
+  {value:'10',label:'待客户确认结算函'},
+  {value:'11',label:'客户驳回结算函'},
+  {value:'12',label:'订单执行完成'},
+  {value:'13',label:'订单已取消'}
+]
+
+export const budgetStatusOptions = [
+  {value:"1",label:"待上传方案"},
+  {value:"2",label:"待上传计划预算"},
+  {value:"3",label:"待客户确认"},
+  {value:"4",label:"客户确认完成"}
+]
+
 const statusList = [
   { name: "启用", code: 1 },
   { name: "禁用", code: 0 },

+ 20 - 21
src/components/approval-node/src/credentials.vue

@@ -1,7 +1,23 @@
 <template>
-    <el-form label-position="left" :model="ruleForm" :rules="rules" ref="ruleForm" size="mini">
-      <el-form-item label="凭证图片" :prop="imageProp" style="display:flex;">
-        <div class="good_info_img_div" style="margin-left:15px">
+    <el-form label-position="left" :model="ruleForm" :rules="rules" ref="ruleForm" size="mini" label-width="95px">
+      <el-form-item label="付款总金额" :prop="amountProp"  v-if="isAmount">
+        <digital-input
+          style="width:100%"
+          size="default"
+          :values="ruleForm[amountProp]"
+          :placeholder="'付款总金额'"
+          :min="0"
+          :max="100"
+          :position="'right'"
+          :precision="2"
+          :controls="false"
+          :append="'元'"
+          @reschange="numberChange($event, amountProp)"
+        />
+      </el-form-item>
+
+      <el-form-item label="凭证图片" :prop="imageProp">
+        <div class="good_info_img_div">
           <ul v-if="ruleForm[imageProp]" class="clear">
             <li
               class="img-show-li"
@@ -42,23 +58,7 @@
         </div>
       </el-form-item>
 
-      <el-form-item label="付款总金额" :prop="amountProp" style="display:flex" v-if="isAmount">
-        <digital-input
-          style="width:500px"
-          size="default"
-          :values="ruleForm[amountProp]"
-          :placeholder="'付款总金额'"
-          :min="0"
-          :max="100"
-          :position="'right'"
-          :precision="2"
-          :controls="false"
-          :append="'%'"
-          @reschange="numberChange($event, amountProp)"
-        />
-      </el-form-item>
-
-      <el-form-item class="flex-end" style="width:600px">
+      <el-form-item class="flex-end" style="width:100%">
         <el-button type="primary" @click="onSubmit">保存</el-button>
       </el-form-item>
     </el-form>
@@ -90,7 +90,6 @@ export default {
       rules:{
         [this.imageProp]:[
           {
-            type:'Array',
             required:true,
             trigger:'change',
             message:'请上传凭证图片'

+ 48 - 38
src/views/customerService/demandOrder/columns.js

@@ -6,72 +6,81 @@ const statusList = [
   { id: '4', label: '取消议价', type: 'info' }
   // 已选完商品,取消议价
 ]
+
+//*  预付类型选项 **/ 
+const prepaymentTypeOptions =  [
+  {value:0,label:"未申请预付"},
+  {value:1,label:"已申请预付"},
+  {value:2,label:"预付完成"},
+]
+
 const listCol = [
   {
-    prop: '需求订单编号prop',
+    prop: 'reqCode',
     label: '需求订单编号',
-    width: '155'
+    width: '185'
   },
 
   {
-    prop: '活动城市prop',
+    prop: 'shortname',
     label: '活动城市',
-    width: '155'
+    width: '90'
   },
 
   {
-    prop: '需求项目prop',
-    label: '需求项目',
+    prop: 'req_demand',
+    label: '项目需求',
     width: '120px'
   },
   {
-    prop: '活动人数prop',
+    prop: 'participant',
     label: '活动人数',
     width: '155'
   },
 
   {
-    prop: '活动需求prop',
+    prop: 'require_item',
     label: '活动需求',
     width: '155px'
   },
   {
-    prop: '活动时间prop',
+    prop: 'act_time',
     label: '活动时间',
     width: '155px'
   },
   {
-    prop: '活动总天数prop',
+    prop: 'act_day_count',
     label: '活动总天数',
-    'min-width': '180'
+    'width': '90'
   },
   {
-    prop: '咨询截止时间prop',
+    prop: 'req_endtime',
     label: '咨询截止时间',
     'min-width': '125'
   },
   {
-    prop: '状态prop',
+    prop: 'status',
     label: '状态',
-    minWidth: '150px'
+    minWidth: '170px',
+    _slot_:'status'
   },
   {
-    prop: '需求公司prop',
+    prop: 'companyName',
     label: '需求公司',
-    'width': '120'
+    'width': '150'
   },
   {
-    prop: '联系电话prop',
+    prop: 'req_tel',
     label: '联系电话',
     'width': '120'
   },
   {
-    prop: '创建人prop',
+    prop: 'req_user_name',
     label: '创建人',
     'width': '120'
   },
   {
-    prop: '创建时间prop',
+    prop: 'update_time',
     label: '创建时间',
     'width': '120'
   },
@@ -88,67 +97,67 @@ const listCol = [
 
 const demandDetailColumns = [
   {
-    prop:'todo',
-    label:'活动城市',
+    prop:'reqCode',
+    label:"需求订单编号",
     span:8
   },
   {
-    prop:'todo',
+    prop:'req_user_name',
     label:'创建人',
     span:8
   },
   {
-    prop:'todo',
+    prop:'create_time',
     label:'创建时间',
     span:8
   },
   {
-    prop:'todo',
+    prop:'shortname',
     label:'活动城市',
     span:8
   },
   {
-    prop:'todo',
+    prop:'require_item',
     label:'活动需求',
     span:8
   },
   {
-    prop:'todo',
+    prop:'act_time',
     label:'活动时间',
     span:8
-  },
+  },  
   {
-    prop:'todo',
+    prop:'participant',
     label:'活动人数',
     span:8
   },
   {
-    prop:'todo',
-    label:'需求项目',
+    prop:'req_demand',
+    label:'项目需求',
     span:8
   },
   {
-    prop:'todo',
+    prop:'req_endtime',
     label:'招标截止时间',
     span:8
   },
   {
-    prop:'todo',
-    label:'需求公司',
+    prop: 'companyName',
+    label: '需求公司',
     span:8
   },
   {
-    prop:'todo',
+    prop:'flow_stage',
     label:'当前阶段',
     span:8
   },
   {
-    prop:'todo',
+    prop:'supplierName',
     label:'活动执行供应商',
     span:8
   },
   {
-    prop:'todo',
+    prop:'budget',
     label:'需求预算',
     span:8
   },
@@ -165,7 +174,7 @@ const demandDetailColumns = [
     _slot_:'prepaymentAmount'
   },
   {
-    prop:'todo',
+    prop:'settle_amount',
     label:'活动结算金额',
     span:8
   },
@@ -180,5 +189,6 @@ const demandDetailColumns = [
 export {
   listCol, 
   statusList,
-  demandDetailColumns
+  demandDetailColumns,
+  prepaymentTypeOptions
 }

+ 38 - 10
src/views/customerService/demandOrder/components/demandDetail/index.vue

@@ -4,41 +4,58 @@
       style="padding: -5px 0 10px 0"
       v-if="newTime !== ''"
       :newTime="newTime"
-      :sitem="data"
+      :sitem="sitem"
       :columns="demandDetailColumns" 
     >
       <template #prepaymentType>
         <div class="flex-between align-center" style="height:18px;padding-top:5px">
-          <p style="margin-left:5px">未设置</p>
+          <p style="margin-left:5px">
+            {{sitem.prepay_type}}
+          </p>
           <el-button style="margin-right:5px;line-height:8px" type="primary" size="mini" @click="requsetModalVisible = true">申请预付</el-button>
         </div>
       </template>
 
       <template #prepaymentAmount>
         <div class="flex-between align-center" style="height:18px;padding-top:5px">
-          <p style="margin-left:5px">0</p>
+          <p style="margin-left:5px">{{sitem.prepay_amount}}</p>
           <el-button style="margin-right:5px;line-height:8px" type="primary" size="mini" @click="uploadModalVisible = true">上传预付付款凭证</el-button>
         </div>
       </template>
 
       <template #currentStatus>
         <div class="align-center" style="height:18px;padding-top:5px">
-          <p style="margin-left:5px">待供应商反馈评估预算函</p>
-          <el-button style="margin-left:5px;line-height:8px" type="primary" size="mini">切换到上一节点</el-button>
-          <el-button style="margin-right:5px;line-height:8px" type="primary" size="mini">切换到下一节点</el-button>
+          <p style="margin-left:5px">{{
+            demandStatusOptions.find(({value}) => value === String(sitem.status)).label
+            }}</p>
+          <el-button 
+            v-if="Number(sitem.status) > 2 && Number(sitem.status) < 5"
+            style="margin-left:5px;line-height:8px" type="primary" size="mini"
+             @click="handleSwitchNode('prev')">
+             切换到上一节点
+          </el-button>
+
+          <el-button 
+            v-if="Number(sitem.status) >= 1 && Number(sitem.status) < 3"
+            style="margin-right:5px;line-height:8px" 
+            type="primary" size="mini" @click="handleSwitchNode('next')">
+            切换到下一节点
+          </el-button>
         </div>
       </template>
     </show-data-table>
 
-    <request-perpayment-modal :visible.sync="requsetModalVisible" />
-    <upload-cerfificate-modal :visible.sync="uploadModalVisible" />
+    <request-perpayment-modal :sitem="sitem" :visible.sync="requsetModalVisible" @refresh="$emit('refresh')" />
+    <upload-cerfificate-modal :sitem="sitem" :visible.sync="uploadModalVisible"  @refresh="$emit('refresh')" />
   </div>
 </template>
 
 <script>
-import { demandDetailColumns } from "./../../columns"
+import { demandDetailColumns, prepaymentTypeOptions } from "./../../columns"
 import RequestPerpaymentModal from "./requsetPerpaymentModal.vue"
 import UploadCerfificateModal from "./uploadCertificateModal.vue"
+import { demandStatusOptions } from '@/assets/js/statusList'
+
 export default {
   name:'demandDetail',
   components:{
@@ -49,6 +66,10 @@ export default {
     data:{
       type:Object,
       default:() => ({})
+    },
+    sitem:{
+      type:Object,
+      default:() => ({})
     }
   },
   watch:{
@@ -58,15 +79,22 @@ export default {
       },
       deep:true,
       immediate:true
-    }
+    },
   },
   data(){
     return {
+      demandStatusOptions,
+      prepaymentTypeOptions,
       requsetModalVisible:false, //申请预付模态框
       uploadModalVisible:false, // 上传预付凭证模态框
       demandDetailColumns,
       newTime:""
     }
+  },
+  methods:{
+    handleSwitchNode(mode){
+      this.$emit('switchNode', mode)
+    }
   }
 }
 </script>

+ 32 - 16
src/views/customerService/demandOrder/components/demandDetail/requsetPerpaymentModal.vue

@@ -1,15 +1,15 @@
 <template>
   <el-dialog :visible="innerVisible" title="申请预付" width="380px" center :close-on-click-modal="false" @close="onClose">
     <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" size="mini" label-width="80px">
-      <el-form-item label="预付类型" prop="prepaymentType">
-        <el-select style="width:100%" placeholder="预付类型" v-model="ruleForm.prepaymentType">
-          <el-option />
+      <el-form-item label="预付类型" prop="prepay_type">
+        <el-select style="width:100%" placeholder="预付类型" v-model="ruleForm.prepay_type">
+          <el-option v-for="prepay in prepaymentTypeOptions" :key="prepay.value" :label="prepay.label" :value="prepay.value" />
         </el-select>
       </el-form-item>
 
-      <el-form-item label="支付比例" prop="paymentRatio">
-        <el-select style="width:100%" v-model="ruleForm.paymentRatio" placeholder="支付比例">
-          <el-option />
+      <el-form-item label="支付比例" prop="prepay_tax">
+        <el-select style="width:100%" v-model="ruleForm.prepay_tax" placeholder="支付比例">
+          <el-option v-for="ratio in payRatioOptions" :key="ratio.value" :label="ratio.label" :value="ratio.value"  />
         </el-select>
       </el-form-item>
 
@@ -21,14 +21,17 @@
 </template>
 
 <script>
+import { prepaymentTypeOptions } from "./../../columns"
+import asyncRequest from "@/apis/service/customerService/demandOrder";
+
 /**
  * @props
-  prepaymentType  //预付类型
-  paymentRatio  //支付比例
+  prepay_type  //预付类型
+  prepay_tax  //支付比例
 */
 
 export default {
-  props:['visible'],
+  props:['visible','sitem'],
   computed:{
     innerVisible:{
       get(){
@@ -41,17 +44,23 @@ export default {
   },
   data(){
     return {
+      prepaymentTypeOptions,
+      payRatioOptions:[
+        { value: "50", label: "50%"},
+        { value: "30", label: "30%"},
+        { value: "10", label: "10%"},
+      ],
       ruleForm:{
-          prepaymentType:"",  //预付类型
-          paymentRatio:"" //支付比例
+          prepay_type:"",  //预付类型
+          prepay_tax:"" //支付比例
       },
       rules:{
-        prepaymentType:[{
+        prepay_type:[{
           required:true,
           trigger:'change',
           message:'请选择预付类型'
         }],
-        paymentRatio:[{
+        prepay_tax:[{
           required:true,
           trigger:'change',
           message:'请选择支付比例'
@@ -62,15 +71,22 @@ export default {
   methods:{
     onClose(){
       this.ruleForm = {
-        prepaymentType:"",  //预付类型
-        paymentRatio:"" //支付比例
+        prepay_type:"",  //预付类型
+        prepay_tax:"" //支付比例
       }
       this.innerVisible = false
     },
     async onSubmit(){
       try {
         await this.$refs.ruleForm.validate()
-        console.log('todo...')
+        const { code } = await asyncRequest.prepayApply({
+          id:this.sitem.id,
+          ...this.ruleForm
+        })
+        if(code === 1){
+          this._visible = false
+          this.$emit("refresh")
+        }
       }catch(err){
         console.log(err)
       }

+ 1 - 52
src/views/customerService/demandOrder/components/demandDetail/uploadCertificateModal.vue

@@ -1,56 +1,6 @@
 <template>
   <el-dialog :visible="innerVisible" width="500px" title="上传预付付款凭证" center :close-on-click-modal="false" @close="handleClose">
-    <el-form label-position="left" :model="ruleForm" :rules="rules" ref="ruleForm" size="mini" label-width="95px">
-      <el-form-item label="预付总金额" prop="prepaymentAmount">
-        <el-input placeholder="预付总金额" v-model="ruleForm.prepaymentAmount" />
-      </el-form-item>
-
-      <el-form-item label="凭证图片" prop="certificateImage" label-width="80px">
-        <div class="good_info_img_div" style="margin-left:15px">
-          <ul v-if="ruleForm.certificateImage" class="clear">
-            <li
-              class="img-show-li"
-              v-viewer
-              v-for="(img, iindex) in ruleForm.certificateImage"
-              :key="img + iindex"
-            >
-              <div class="img-show-li-div">
-                <img :src="img" class="img-show" alt="" />
-                <i
-                  class="el-icon-close"
-                  @click="closeImg(iindex, 'certificateImage')"
-                ></i>
-              </div>
-            </li>
-            <li
-              class="img-show-li"
-              v-if="ruleForm.certificateImage.length < 11"
-            >
-              <div class="activity-upload">
-                <div class="btnupload" style="position: relative">
-                  <i class="el-icon-plus avatar-uploader-icon"></i>
-                  <file-upload
-                    class="Upload"
-                    :disabled="type === 'view' || type === 'editCoin'"
-                    :accept="'.jpg,.png,.jpeg'"
-                    :multiple="true"
-                    :uploadcondition="beforeAvatarUpload"
-                    @UploadErrorEvent="UploadErrorEvent($event, 'certificateImage')"
-                    @UploadSuccessEvent="
-                      UploadSuccessEvent($event, 'certificateImage')
-                    "
-                  />
-                </div>
-              </div>
-            </li>
-          </ul>
-        </div>
-      </el-form-item>
-
-      <el-form-item class="flex-end">
-        <el-button type="primary" @click="onSubmit">保存</el-button>
-      </el-form-item>
-    </el-form>
+    <credentials-node is-amount />
   </el-dialog>
 </template>
 
@@ -62,7 +12,6 @@
   certificateImage //付款凭证图
  */
 
-
 export default {
   props:['visible'],
   computed:{

+ 124 - 11
src/views/customerService/demandOrder/components/manageActivityScheme.vue

@@ -1,20 +1,133 @@
 <template>
-  <el-table border size="mini">
-    <el-table-column label="方案编号" />
-    <el-table-column label="状态" />
-    <el-table-column label="活动方案预览" />
-    <el-table-column label="供应商店铺" />
-    <el-table-column label="供应商公司" />
-    <el-table-column label="创建人" />
-    <el-table-column label="创建时间" />
-    <el-table-column label="操作" />
-  </el-table>
+ <div v-loading="loading">
+    <ex-table
+      :columns="columns"
+      :table="table"
+      :data="planList"
+      style="margin: 15px 0 0 0"
+      :page="pageInfo"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+    >
+      <template #is_check="{scope}">
+        <el-tag size="mini" :type="String(scope.row.is_check) === '1' ? '' :'info'">
+         {{String(scope.row.is_check) === "1" ?  "已选择" : "未选择"}}
+        </el-tag>
+      </template>
+
+      <template #action="{scope}">
+        <el-button size="mini" type="text" @click="handleCheck(scope.row.id)">{{
+          String(scope.row.is_check) === "1" ?  "取消选择" : "选择"
+          }}</el-button>
+      </template>
+    </ex-table>
+ </div>
 </template>
 
 <script>
+import asyncRequest from "@/apis/service/customerService/demandOrder";
+import mixinPage from "@/mixins/elPaginationHandle";
 export default {
+  props:['sitem'],
+  mixins:[mixinPage],
   data(){
-    return {}
+    return {
+      loading:false,
+      planList:[],
+      table: {
+        stripe: true,
+        border: true,
+        'max-height': '800px'
+      },
+       pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+     columns: [
+       {
+           type: 'index',
+           label: '序号',
+           width: '70px'
+       },
+       {
+           prop: "planCode",
+           label: '评估预算函编号',
+           width: '120px',
+       },
+       {
+           prop: "is_check",
+           label: '是否选择',
+           width: '120px',
+           _slot_:'is_check'
+       },
+       {
+           prop: "plan_file",
+           label: '评估预算函',
+           width: '156px',
+       },
+       {
+           prop: "plan_total_price",
+           label: '评估预算金额',
+           width: '180px',
+       },
+       {
+           prop: "store_name",
+           label: '供应商店铺名称',
+           width: '156px',
+       },
+       {
+           prop: "supplierName",
+           label: '供应商公司名称',
+           width: '156px',
+       },
+       {
+           prop: "nickname",
+           label: '创建人',
+           width: '150px',
+       },
+       {
+           prop: "create_time",
+           label: '创建时间',
+           minWidth: '150px',
+       },
+       {
+        label:'操作',
+        _slot_:"action"
+       }
+      ]
+    }
+  },
+  watch:{
+    'sitem':{
+      handler(val = {}){
+        const { id } = val
+        if(!id) return
+        this.searchList(id)
+      },
+      immediate: true,
+      deep:true
+    }
+  },
+  methods:{
+    async handleCheck(id){
+      console.log(id)
+      const result = await asyncRequest.planCheck({id})
+      if(result.code === 1){
+        this.searchList()
+      }
+    },
+    async searchList(id){
+      this.loading = true
+      const { code, data }  = await asyncRequest.planList({ req_id: id ? id : this.sitem.id })
+      this.loading = false
+
+      if(code === 1){
+        const { list = [], count = 0 } = data
+        this.planList = list;
+        this.pageInfo.total = count
+      }
+    }
   }
 }
 </script>

+ 125 - 12
src/views/customerService/demandOrder/components/manageBudgetLetter.vue

@@ -1,21 +1,134 @@
 <template>
-  <el-table border size="mini">
-    <el-table-column label="评估预算函编号" />
-    <el-table-column label="状态" />
-    <el-table-column label="评估预算函" />
-    <el-table-column label="评估预算金额" />
-    <el-table-column label="供应商店铺名称" />
-    <el-table-column label="供应商公司名称" />
-    <el-table-column label="创建人" />
-    <el-table-column label="创建时间" />
-    <el-table-column label="操作" />
-  </el-table>
+ <div v-loading="loading">
+    <ex-table
+      :columns="columns"
+      :table="table"
+      :data="planList"
+      style="margin: 15px 0 0 0"
+      :page="pageInfo"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+    >
+      <template #is_check="{scope}">
+        <el-tag size="mini" :type="String(scope.row.is_check) === '1' ? '' :'info'">
+         {{String(scope.row.is_check) === "1" ?  "已选择" : "未选择"}}
+        </el-tag>
+      </template>
+
+      <template #action="{scope}">
+        <el-button size="mini" type="text" @click="handleCheck(scope.row)">{{
+          String(scope.row.is_check) === "1" ?  "取消选择" : "选择"
+          }}</el-button>
+      </template>
+    </ex-table>
+ </div>
 </template>
 
 <script>
+import asyncRequest from "@/apis/service/customerService/demandOrder";
+import mixinPage from "@/mixins/elPaginationHandle";
 export default {
+  props:['sitem'],
+  mixins:[mixinPage],
   data(){
-    return {}
+    return {
+      loading:false,
+      planList:[],
+      table: {
+        stripe: true,
+        border: true,
+        'max-height': '800px'
+      },
+       pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+     columns: [
+       {
+           type: 'index',
+           label: '序号',
+           width: '70px'
+       },
+       {
+           prop: "planCode",
+           label: '评估预算函编号',
+           width: '120px',
+       },
+       {
+           prop: "is_check",
+           label: '是否选择',
+           width: '120px',
+           _slot_:'is_check'
+       },
+       {
+           prop: "plan_file",
+           label: '评估预算函',
+           width: '156px',
+       },
+       {
+           prop: "plan_total_price",
+           label: '评估预算金额',
+           width: '180px',
+       },
+       {
+           prop: "store_name",
+           label: '供应商店铺名称',
+           width: '156px',
+       },
+       {
+           prop: "supplierName",
+           label: '供应商公司名称',
+           width: '156px',
+       },
+       {
+           prop: "nickname",
+           label: '创建人',
+           width: '150px',
+       },
+       {
+           prop: "create_time",
+           label: '创建时间',
+           minWidth: '150px',
+       },
+       {
+        label:'操作',
+        _slot_:"action"
+       }
+      ]
+    }
+  },
+  watch:{
+    'sitem':{
+      handler(val = {}){
+        const { id } = val
+        if(!id) return
+        this.searchList(id)
+      },
+      immediate: true,
+      deep:true
+    }
+  },
+  methods:{
+    async handleCheck(row){
+      const { id, is_check } = row
+      const status = String(is_check) === "1" ? "0" : "1"
+      const result = await asyncRequest.planCheck({ id:[id], req_id: this.sitem.id ,status })
+      if(result.code !== 1) return
+      this.searchList()
+    },
+    async searchList(id){
+      this.loading = true
+      const { code, data }  = await asyncRequest.planList({ req_id: id ? id : this.sitem.id })
+      this.loading = false
+
+      if(code === 1){
+        const { list = [], count = 0 } = data
+        this.planList = list;
+        this.$emit('selectedChange',list.filter(({is_check}) => String(is_check) === "1").length)
+        this.pageInfo.total = count
+      }
+    }
   }
 }
 </script>

+ 44 - 59
src/views/customerService/demandOrder/detail.vue

@@ -1,19 +1,19 @@
 <template>
   <div class="bargainListDetail">
-    <div class="bargainListDetail-main" v-if="powers.some((i) => i == '007')">
+    <div class="bargainListDetail-main">
       <el-tabs v-model="projectTabs" v-loading="loading">
         <el-tab-pane label="需求订单详情" name="1">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
             <el-collapse-item title="需求订单详情" name="1">
-              <demand-detail />
+              <demand-detail :sitem="sitem" @refresh="refresh" @switchNode="handleSwitchNode" />
             </el-collapse-item>
             
-            <el-collapse-item title="评估预算函管理" name="2">
-              <manage-budgeet-letter />
+            <el-collapse-item title="评估预算函管理" name="2" v-if="Number(sitem.status) === 1">
+              <manage-budgeet-letter :sitem="sitem" @selectedChange="num => selectedNum_1 = num" />
             </el-collapse-item>
 
-            <el-collapse-item title="活动方案管理" name="3">
-              <activity-scheme />
+            <el-collapse-item title="活动方案管理" name="3" v-if="Number(sitem.status) === 2">
+              <manage-activity-scheme :sitem="sitem" @selectedChange="num => selectedNum_2 = num" />
             </el-collapse-item>
 
             <el-collapse-item title="待客户上传确认凭证" name="4">
@@ -42,16 +42,13 @@
           </el-collapse>
         </el-tab-pane>
        </el-tabs>
-    </div>
-    <div v-else>
-      <no-auth></no-auth>
+
+       <!-- <letter-modal /> -->
     </div>
   </div>
 </template>
 <script>
-import asyncRequest from "@/apis/service/sellOut/bargainList";
-import resToken from "@/mixins/resToken";
-import { mapGetters } from "vuex";
+import asyncRequest from "@/apis/service/customerService/demandOrder";
 import privateField from '../../../mixins/privateField';
 import DemandDetail from "./components/demandDetail/index.vue"
 import ManageBudgeetLetter from "./components/manageBudgetLetter.vue"
@@ -60,15 +57,20 @@ import WaitExecuteCertificate from "./components/waitExecuteCertificate.vue"
 import WaitSupplierConfirm from "./components/waitSupplierConfirm.vue"
 import WaitCustomerConfirm from "./components/waitCustomerConfirm.vue"
 
+// import LetterModal from "./components/letterModal/index.vue"
+import resToken from "@/mixins/resToken";
+import { mapGetters } from "vuex";
 import { statusList } from "./columns";
+
 export default {
   components: { 
+    // LetterModal,
     DemandDetail, 
     ManageBudgeetLetter, 
+    WaitSupplierConfirm, 
+    WaitCustomerConfirm, 
     ManageActivityScheme, 
     WaitExecuteCertificate,
-    WaitSupplierConfirm , 
-    WaitCustomerConfirm, 
   },
   name: "demandOrderDetail",
   mixins: [resToken,privateField],
@@ -90,6 +92,8 @@ export default {
 
   data() {
     return {
+      selectedNum_1: 0,
+      selectedNum_2: 0,
       size: "small",
       statusList,
       projectTabs: "1",
@@ -99,7 +103,7 @@ export default {
       queryType: "",
       queryId: "",
       status: "",
-      sitem: null,
+      sitem: {},
 
       orderItem: {},
       moneyDirItem: {},
@@ -128,52 +132,17 @@ export default {
       console.log(row);
     },
     async refresh() {
-      this.routeReGoto("bargainList", {});
+      this.initData()
     },
     async initData() {
       this.loading = true;
       const { code, message, data } = await asyncRequest.detail({
-        bargainNo: this.queryId,
+        id: this.queryId,
       });
-
-      this.eaxmList = [];
       this.loading = false;
-      if (code === 0) {
+      if (code === 1) {
         this.sitem = JSON.parse(JSON.stringify(data));
-
-        const { status, exam_info } = this.sitem;
-        this.orderItem = {};
-        this.moneyDirItem = {};
-        this.moneyItem = {};
-        this.BossItem = {};
-        if (exam_info && exam_info.length > 0) {
-          exam_info.forEach((e) => {
-            console.log(e.status);
-            switch (e.info_status + "") {
-              case "0":
-                this.orderItem = JSON.parse(JSON.stringify(e));
-                break;
-              case "2":
-                this.moneyDirItem = JSON.parse(JSON.stringify(e));
-                break;
-              case "4":
-                this.moneyItem = JSON.parse(JSON.stringify(e));
-                break;
-              case "7":
-                this.BossItem = JSON.parse(JSON.stringify(e));
-                break;
-              default:
-                this.orderItem = JSON.parse(JSON.stringify(e));
-            }
-          });
-          this.eaxmList = JSON.parse(JSON.stringify(exam_info));
-        }
-
-        this.status = status;
-
         this.getNewTime();
-      } else if (code >= 100 && code <= 104) {
-        await this.logout();
       } else {
         this.$message.warning(message);
       }
@@ -181,16 +150,32 @@ export default {
     getNewTime() {
       this.newTime = new Date().valueOf();
     },
+    async handleSwitchNode(mode){
+      const minuend = mode === 'next' ? 1 : -1
+      const status = this.sitem.status + minuend
+      
+      if(mode === 'next'){
+        if(status === 1 && this.selectedNum_1 === 0){
+          this.$message.warning('未选择评估预算函')
+          return
+        }
+
+        if(status === 2 && this.selectedNum_2 === 0){
+          this.$message.warning('未选择活动方案')
+          return
+        }
+      }
+
+      const { code } = await asyncRequest.checkNode({id: this.sitem.id, status })
+      if(code !== 1) return
+      this.initForm()
+    },
     async statusSubmit(model, title) {
       if (model.status === "0") model.status = "2";
-      const { code, data, message } = await asyncRequest.status(model);
+      const { code, message } = await asyncRequest.status(model);
       this.loading = false;
-      // console.log("res", data);
       if (code === 0) {
-        this.$notify.success({
-          title: title + "成功!",
-          message: "",
-        });
+        this.$notify.success({ title: title + "成功!", message: "" });
         await this.initForm();
       } else if (code >= 100 && code <= 104) {
         await this.logout();

+ 62 - 79
src/views/customerService/demandOrder/index.vue

@@ -28,8 +28,8 @@
             <el-row style="padding: 0 0 0 80px">
               <el-col :span="4" style="width: 351px;">
                 <period-date-picker
-                  :start="parmValue.createStart"
-                  :end="parmValue.createEnd"
+                  :start="parmValue.addtime_start"
+                  :end="parmValue.addtime_end"
                   :width="'160px'"
                   :size="searchSize"
                   placeholder="创建"
@@ -37,16 +37,6 @@
                 />
               </el-col>
 
-              <el-col :span="4" style="width:200px">
-                <el-select v-model="parmValue.activityPerson" size="mini" placeholder="活动人数" @change="
-                pageInfo.curr = 1;
-                parmValue.page = 1;
-                searchList();
-               ">
-                  <el-option />
-                </el-select>
-              </el-col>
-
               <el-col :span="4" style="width:200px">
                 <el-select v-model="parmValue.city" size="mini" placeholder="活动城市" @change="
                 pageInfo.curr = 1;
@@ -83,8 +73,8 @@
             <el-row style="margin-top:10px">
               <el-col :span="4" style="width: 341px;">
                 <period-date-picker
-                  :start="parmValue[activityStart]"
-                  :end="parmValue[activityEnd]"
+                  :start="parmValue[act_start]"
+                  :end="parmValue[act_end]"
                   :width="'154px'"
                   :size="searchSize"
                   @timeReturned="evt => handleTime(evt,'activity')"
@@ -93,12 +83,16 @@
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
-                <el-select v-model="parmValue.currentStatus" style="width:100%" size="mini" placeholder="当前状态" @change="
+                <el-select v-model="parmValue.status" style="width:100%" size="mini" placeholder="当前状态" @change="
                 pageInfo.curr = 1;
                 parmValue.page = 1;
                 searchList();
                ">
-                  <el-option />
+                  <el-option v-for="status in demandStatusOptions" 
+                    :key="status.value" 
+                    :value="status.value" 
+                    :label="status.label"
+                   />
                 </el-select>
               </el-col>
 
@@ -116,8 +110,8 @@
             <el-row style="margin-top:10px">
               <el-col :span="4" style="width: 341px;">
                 <period-date-picker
-                  :start="parmValue.consultationStart"
-                  :end="parmValue.consultationEnd"
+                  :start="parmValue.req_start"
+                  :end="parmValue.req_end"
                   :width="'154px'"
                   :size="searchSize"
                   @timeReturned="evt => handleTime(evt,'consultation')"
@@ -126,7 +120,7 @@
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
-                <el-input v-model="parmValue.mobile" size="mini" placeholder="联系电话" @change="
+                <el-input v-model="parmValue.req_tel" size="mini" placeholder="联系电话" @change="
                 pageInfo.curr = 1;
                 parmValue.page = 1;
                 searchList();
@@ -134,7 +128,7 @@
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
-                <el-input size="mini" placeholder="需求编号" v-model="parmValue.demandNo" @change="
+                <el-input size="mini" placeholder="需求编号" v-model="parmValue.reqCode" @change="
                 pageInfo.curr = 1;
                 parmValue.page = 1;
                 searchList();
@@ -178,9 +172,8 @@
         <template #status="{ scope }">
           <el-tag
             :size="tablebtnSize"
-            :type="(statusList.find((item) => item.id == scope.row.status) || {}) .type || ''"
             v-text="
-              (statusList.find((item) => item.id == scope.row.status) || {})
+              (demandStatusOptions.find((item) => item.value == String(scope.row.status)) || {})
                 .label || '--'
             "
           ></el-tag>
@@ -203,18 +196,17 @@
         </template>
         <template #operation="{ scope }">
           <el-tooltip
-            v-if="powers.some((i) => i == '007')"
             effect="dark"
             content="详情"
             placement="top"
           >
             <i
               class="el-icon-view tb-icon"
-               @click="getRouter('demandOrderDetail', scope.row.bargainNo)"
+               @click="getRouter('demandOrderDetail', scope.row.id)"
             ></i>
           </el-tooltip>
 
-          <el-tooltip
+          <!-- <el-tooltip
             v-if="powers.some((i) => i == '007')"
             effect="dark"
             content="编辑预算函"
@@ -224,7 +216,7 @@
               class="el-icon-edit tb-icon"
                @click="getRouter('letterEditing', scope.row.bargainNo)"
             ></i>
-          </el-tooltip>
+          </el-tooltip> -->
         </template>
       </ex-table>
     </div>
@@ -240,22 +232,23 @@ import asyncRequest from "@/apis/service/customerService/demandOrder";
 import companyHelper from "@/mixins/companyHelper"
 import { listCol, statusList } from "./columns";
 import { mapGetters } from "vuex";
+import { demandStatusOptions } from '@/assets/js/statusList';
 
 /**
 * @props
  创建时间开始&结束
-  createStart //创建开始时间
-  createEnd //创建结束时间
-  activityStart //活动开始时间
-  activityEnd //活动结束时间
-  consultationStart //咨询开始时间
-  consultationEnd //咨询结束时间
+  addtime_start //创建开始时间
+  addtime_end //创建结束时间
+  act_start //活动开始时间
+  act_end //活动结束时间
+  req_start //咨询开始时间
+  req_end //咨询结束时间
   activityPerson'//活动人数,
-  activityCity //活动城市,
-  currentStatus //当前状态,
-  mobile //联系电话
+  city //活动城市,
+  status //当前状态,
+  req_tel //联系电话
   activityDemand //活动需求
-  demandNo //需求编号
+  reqCode //需求编号
   demandProject //需求项目
   demandCreator //需求创建人
   demandEnterprise //需求企业
@@ -263,18 +256,18 @@ import { mapGetters } from "vuex";
 
 const mapDateFields = {
   create: {
-    start:'createStart',
-    end:"createEnd",
+    start:'addtime_start',
+    end:"addtime_end",
     label:'创建'
   },
   activity:{
-    start:'activityStart',
-    end:"activityEnd",
+    start:'act_start',
+    end:"act_end",
     label:'活动'
   },
   consultation:{
-    start:"consultationStart",
-    end:"consultationEnd",
+    start:"req_start",
+    end:"req_end",
     label:'咨询'
   }
 }
@@ -298,6 +291,7 @@ export default {
     return {
       select: "1",
       s_input: "",
+      demandStatusOptions,
       customerCode: [], //客户公司code
       statusList,
       sitem: null,
@@ -306,18 +300,18 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
-        createStart:"", //创建开始时间
-        createEnd:"", //创建结束时间
-        activityStart:"", //活动开始时间
-        activityEnd:"", //活动结束时间
-        consultationStart:"", //咨询开始时间
-        consultationEnd:"", //咨询结束时间
+        addtime_start:"", //创建开始时间
+        addtime_end:"", //创建结束时间
+        act_start:"", //活动开始时间
+        act_end:"", //活动结束时间
+        req_start:"", //咨询开始时间
+        req_end:"", //咨询结束时间
         activityPerson:"",//活动人数
-        activityCity:"", //活动城市,
-        currentStatus:"", //当前状态,
-        mobile:"", //联系电话
+        city:"", //活动城市,
+        status:"", //当前状态,
+        req_tel:"", //联系电话
         activityDemand:"", //活动需求
-        demandNo:"", //需求编号
+        reqCode:"", //需求编号
         demandProject:"", //需求项目
         demandCreator:"", //需求创建人
         demandEnterprise:"", //需求企业
@@ -388,21 +382,21 @@ export default {
       this.select = "1";
       this.s_input = "";
       this.parmValue = {
-        createStart:"", //创建开始时间
-        createEnd:"", //创建结束时间
-        activityStart:"", //活动开始时间
-        activityEnd:"", //活动结束时间
-        consultationStart:"", //咨询开始时间
-        consultationEnd:"", //咨询结束时间
-        activityPerson:"",//活动人数
-        activityCity:"", //活动城市,
-        currentStatus:"", //当前状态,
-        mobile:"", //联系电话
-        activityDemand:"", //活动需求
-        demandNo:"", //需求编号
-        demandProject:"", //需求项目
-        demandCreator:"", //需求创建人
-        demandEnterprise:"", //需求企业
+        addtime_start:"", //创建开始时间
+        addtime_end:"", //创建结束时间
+        act_start:"", //活动开始时间
+        act_end:"", //活动结束时间
+        req_start:"", //咨询开始时间
+        req_end:"", //咨询结束时间
+        activityPerson:"",//活动人数 TODO...
+        city:"", //活动城市,
+        status:"", //当前状态,
+        req_tel:"", //联系电话
+        activityDemand:"", //活动需求 TODO...
+        reqCode:"", //需求编号
+        req_rorp:"", //需求项目 TODO...
+        demandCreator:"", //需求创建人 TODO...
+        demandEnterprise:"", //需求企业 TODO...
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
@@ -450,14 +444,6 @@ export default {
     },
     // 列表搜索
     async searchList() {
-      // if (
-      //   (this.parmValue.start !== "" && this.parmValue.end === "") ||
-      //   (this.parmValue.start === "" && this.parmValue.end !== "")
-      // ) {
-      //   this.$message.warning("时间区间不完整!");
-      //   return;
-      // }
-
       for(const field of Object.keys(mapDateFields)){
         const { start:startProp, end:endProp, label } = mapDateFields[field]
 
@@ -474,14 +460,11 @@ export default {
       
       const res = await asyncRequest.list({
         ...this.parmValue,
-        noRelation: true
       });
 
-      if (res && res.code === 0 && res.data) {
+      if (res && res.code === 1 && res.data) {
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
       } else {
         this.tableData = [];
         this.pageInfo.total = 0;

+ 1 - 1
src/views/customerService/demandOrder/letterEditing.vue

@@ -110,7 +110,7 @@ export default {
       return isHeaderOk
     },
     validateRequiredField(requiredFields) {
-        const verification = createFieldVerification('发票申请编号、发票类型、发票号码、开票日期、税后金额不能为空')
+      const verification = createFieldVerification('发票申请编号、发票类型、发票号码、开票日期、税后金额不能为空')
       const fields = helper.fields(requiredFields)
       requiredFields[fields[0]].forEach((_, index) => {
         if (!helper.values(requiredFields, fields, index).every(value => value && String(value).trim() !== '')) {

+ 59 - 0
src/views/customerService/workbench/components/evaluateBudgetLetter/_columns.js

@@ -0,0 +1,59 @@
+const mapFields = {
+  letterNo:'planCode', //评估预算函编号
+  status:'status',  // 状态
+  letter:'plan_file', //评估预算函
+  budgetAmount:'plan_total_price', //评估预算金额
+  supplierStoreName:'store_name', //供应商店铺名称
+  supplierCompanyName:'supplierName', //供应商公司名称
+  creator:'nickname', //创建人
+  createTime:'create_time' //创建时间
+}
+
+export const columns = [
+  {
+      type: 'index',
+      label: '序号',
+      width: '70px'
+  },
+  {
+      prop: mapFields.letterNo,
+      label: '评估预算函编号',
+      width: '120px',
+  },
+  {
+      prop: mapFields.status,
+      label: '是否选中',
+      width: '120px',
+      _slot_:'is_check'
+  },
+  {
+      prop: mapFields.letter,
+      label: '评估预算函',
+      width: '156px',
+  },
+  {
+      prop: mapFields.budgetAmount,
+      label: '评估预算金额',
+      width: '180px',
+  },
+  {
+      prop: mapFields.supplierStoreName,
+      label: '供应商店铺名称',
+      width: '156px',
+  },
+  {
+      prop: mapFields.supplierCompanyName,
+      label: '供应商公司名称',
+      width: '156px',
+  },
+  {
+      prop: mapFields.creator,
+      label: '创建人',
+      width: '150px',
+  },
+  {
+      prop: mapFields.createTime,
+      label: '创建时间',
+      minWidth: '150px',
+  },
+]

+ 133 - 0
src/views/customerService/workbench/components/evaluateBudgetLetter/_template.js

@@ -0,0 +1,133 @@
+const mapFields = {
+  name:"name",
+  primaryClassification:'primaryClassification', // 一级分类
+  secondaryClassification:'secondaryClassification',  // 二级分类
+  threeLevelClassification:'service_cat', // 三级分类
+  price:'price', // 单价
+  unit:'unit', // 单位
+  nonTaxQuotes:'assess_price', // 非税报价
+  taxRate:'tax', // 税率
+  tax:'assess_tax_price', // 税额
+  taxIncludedQuote:'assess_total_price', //含税报价
+  num:'num'
+}
+
+const mapTemplateToTable = {
+  '服务名称': mapFields.name,
+  '一级服务分类': mapFields.primaryClassification,
+  '二级服务分类': mapFields.secondaryClassification,
+  '三级服务分类': mapFields.threeLevelClassification,
+  '单价': mapFields.price,
+  '单位': mapFields.unit,
+  '数量': mapFields.num,
+  '非税报价': mapFields.nonTaxQuotes,
+  '税率': mapFields.taxRate,
+  '税额': mapFields.tax,
+  '含税报价': mapFields.taxIncludedQuote,
+}
+
+export const columns = [
+  {
+      type: 'index',
+      label: '序号',
+      width: '70px'
+  },
+   {
+     prop: mapFields.name,
+     label: '服务名称',
+     width: '120px',
+     required: true
+   },
+  {
+    prop: mapFields.primaryClassification,
+    label: '一级服务分类',
+    width: '120px',
+    required: true
+  },
+  {
+    prop: mapFields.secondaryClassification,
+    label: '二级服务分类',
+    width: '120px',
+    required: true
+  },
+  {
+    prop: mapFields.threeLevelClassification,
+    label: '三级服务分类',
+    width: '120px',
+    required: true
+  },
+  {
+      prop: mapFields.price,
+      label: '单价',
+      width: '120px',
+      required: true
+  },
+  {
+    prop: mapFields.unit,
+    label: '单位',
+    width: '120px',
+    required: true
+  },
+  {
+    prop:mapFields.num,
+    label:'数量',
+    width:'100px',
+    required:true
+  },
+  {
+      prop: mapFields.nonTaxQuotes,
+      label: '非税报价',
+      width: '126px',
+      required: true
+  },
+  {
+      prop: mapFields.taxRate,
+      label: '税率',
+      width: '126px',
+      required: true
+  },
+  {
+    prop: mapFields.tax,
+    label: '税额',
+    width: '126px',
+    required: true
+},
+  {
+      prop: mapFields.taxIncludedQuote,
+      label: '含税报价',
+      width: '120px',
+      required: true
+  }
+]
+
+export const getTableProperty = (key) => mapTemplateToTable[key]
+export const getColumn = (key) => columns.find(column => key === column.prop) 
+
+export const template = Array(1).fill(1).map(() => Object.keys(mapTemplateToTable).reduce((prev, property) => {
+  prev[property] = ''
+  return prev
+}, {}))
+
+
+export const requiredFields = [
+  mapFields.name,
+  mapFields.threeLevelClassification,
+  mapFields.price,
+  mapFields.unit,
+  mapFields.num,
+  mapFields.taxRate,
+  mapFields.nonTaxQuotes,
+  mapFields.taxIncludedQuote
+]
+
+export const requsetFields = [
+  mapFields.name,
+  mapFields.threeLevelClassification,
+  mapFields.price,
+  mapFields.unit,
+  mapFields.num,
+  mapFields.taxRate,
+  // mapFields.tax,
+  // mapFields.nonTaxQuotes,
+  // mapFields.taxIncludedQuote
+]

+ 65 - 0
src/views/customerService/workbench/components/evaluateBudgetLetter/index.vue

@@ -0,0 +1,65 @@
+<template>
+  <div style="margin-bottom:10px">
+    <div style="display:flex;justify-content:flex-end" v-if="!readonly">
+      <el-button size="mini" @click="onDownloadTemplate">下载评估预算模板</el-button>
+      <el-button size="mini" type="primary" @click="xlsxVisible = true">上传评估预算函</el-button>
+    </div>
+
+    <ex-table
+      :columns="columns"
+      :table="table"
+      :data="planList"
+      style="margin: 15px 0 0 0"
+      noPagination
+    >
+      <template #is_check="{scope}">
+        <el-tag size="mini" :type="String(scope.row.is_check) === '1' ? '' :'info'">
+         {{String(scope.row.is_check) === "1" ?  "已选择" : "未选择"}}
+        </el-tag>
+      </template>
+
+    </ex-table>
+    <letter-modal :visible.sync="xlsxVisible" :sitem="sitem" :title="title" @refresh="refresh" />
+  </div>
+</template>
+
+<script>
+import { columns } from "./_columns"
+import { template } from "./_template"
+import LetterModal from "./letterEditing.vue"
+import { writeFile, utils } from "xlsx";
+import { budgetStatusOptions } from '@/assets/js/statusList';
+export default {
+  name:'SettlementBudgetLetter',
+  props:["sitem","planList","readonly"],
+  components:{ LetterModal },
+  data(){
+    return {
+      budgetStatusOptions,
+      title: '评估预算函',
+      table: {
+        stripe: true,
+        border: true,
+        'max-height': '800px'
+      },
+      template,
+      columns,
+      tableData:[],
+      xlsxVisible:false
+    }
+  },
+  methods:{
+    refresh(){
+      this.$emit('refresh')
+    },
+    onDownloadTemplate(){
+      const workBook = utils.book_new()
+      const workSheet = utils.json_to_sheet(template)
+      utils.book_append_sheet(workBook,workSheet,"sheet")
+      writeFile(workBook,`${this.title}模板.xlsx`,{
+        bookType:'xlsx'
+      })
+    }
+  }
+}
+</script>

+ 172 - 0
src/views/customerService/workbench/components/evaluateBudgetLetter/letterEditing.vue

@@ -0,0 +1,172 @@
+<template>
+  <el-dialog title="上传评估预算函" :visible="visible" width="1024px" @close="handleClose" center>
+    <div style="padding:10px" v-loading="loading">
+       <div v-if="tableData && tableData.length > 0" class="tr" style="padding: 10px 0 0 0">
+        <el-button :size="'mini'" @click="() => tableData = []">取消</el-button>
+        <el-button type="primary" :size="'mini'" @click="onSubmit">提交</el-button>
+        </div>
+        <div v-else>
+          <upload-excel :on-success="onSuccess" :before-upload="beforeUpload" />
+        </div>
+
+        <ex-table
+          :columns="columns"
+          :table="table"
+          :data="tableData"
+          style="margin: 15px 0 0 0"
+        />
+      </div>
+  </el-dialog>
+</template>
+
+<script>
+import asyncRequest from "@/apis/service/customerService/workbench";
+import companyHelper from '@/mixins/companyHelper'
+import { template } from "./_template"
+import { utils, writeFile } from "xlsx"
+
+import {
+  columns,
+  getColumn,
+  requsetFields,
+  requiredFields,
+  getTableProperty,
+} from './_template'
+
+export default {
+  mixins: [companyHelper],
+  props: ['visible', 'sitem'],
+  data() {
+    return {
+      columns,
+      loading: false,
+      tableData: [],
+      table: {
+        stripe: true,
+        border: true,
+        'max-height': '800px'
+      }
+    }
+  },
+  computed: {
+    innerVisible: {
+      get() {
+        return this.visible
+      },
+      set(newVal) {
+        this.$emit('update:visible', newVal)
+      }
+    }
+  },
+  methods: {
+    handleClose(){
+      this.innerVisible = false
+    },
+    downloadTemplate(){
+      const workBook = utils.book_new()
+      const workSheet = utils.json_to_sheet(template)
+      utils.book_append_sheet(workBook,workSheet,"sheet")
+      writeFile(workBook,"预算函模板.xlsx",{
+        bookType:'xlsx'
+      })
+    },
+    validateTableHeader(header, importHeader) {
+      let isHeaderOk = true
+      console.log(header,importHeader)
+      if (header.length !== importHeader.length) return false
+      for (const index in header) {
+        const field = header[index]
+        const importField = importHeader[index]
+        if (field !== importField) {
+          isHeaderOk = false
+          break
+        }
+      }
+
+      return isHeaderOk
+    },
+    isValueNotNull(value){
+      if(!value) return
+      const _value = String(value)
+      return _value.trim() !== ""
+    },
+    /* 校验导入的数据 **/
+    validateFields(tableData = []) {
+      for (const index in tableData) {
+        const line = Number(index) + 1
+        const tableItem = tableData[index]
+        const properties = Object.keys(tableItem)
+        for (const property of properties) {
+          if(requiredFields.includes(property) && !this.isValueNotNull(tableItem[property])){
+            this.$message.warning(`第 ${line} 行 ${getColumn(property).label} 不能为空`)
+            return false
+          }
+        }
+      }
+
+      return true
+    },
+    mapTemplateItemToTableItem(templateItem) {
+      const tableItem = {}
+      const templatePropertys = Object.keys(templateItem)
+      templatePropertys.forEach(templateProperty => {
+        const tableproperty = getTableProperty(templateProperty)
+        tableItem[tableproperty] = templateItem[templateProperty]
+      })
+      return tableItem
+    },
+    onSuccess({ results: templateItems, header: templateHeader }) {
+      const isHeaderValid = this.validateTableHeader(
+        this.columns.map(({ label }) => label).slice(1),
+        templateHeader
+      )
+
+      if (!isHeaderValid) {
+        this.$message.warning('表格与导入的表头不一致!')
+        return
+      }
+      if (templateItems.length === 0) {
+        this.$message.warning('导入的表格没有数据!')
+        return
+      }
+      templateItems.forEach(templateItem => {
+        const tableItem = this.mapTemplateItemToTableItem(templateItem)
+        this.tableData.push(tableItem)
+      })
+      this.validateFields(this.tableData)
+    },
+    async onSubmit() {
+      if(!this.validateFields(this.tableData)){
+        return
+      }
+
+      const plan_info = this.tableData.map(tableItem => requsetFields.reduce((prev, currentKey) => ({
+        ...prev,
+        [currentKey]: tableItem[currentKey]
+      }), {}))
+
+      const params = {
+        store_id: 1,
+        req_id:this.sitem.id,
+        plan_info
+      }
+
+      const { code } = await asyncRequest.planCreate(params)
+
+      if(code === 1){
+        this.innerVisible = false
+        this.tableData = []
+        this.$emit("refresh")
+      }
+
+      this.loading = true
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.error-message__wrapper{
+  width: 1024px;
+}
+</style>

+ 45 - 96
src/views/customerService/workbench/detail.vue

@@ -1,44 +1,44 @@
 <template>
   <div class="workbenchdetail">
-    <div class="page-main clear" v-if="powers.some((i) => i == '007')">
-      <div v-if="String(status) !== '1'">
+    <div class="page-main clear">
+      <!-- <div v-if="String(status) !== '1'">
         <search-not :placeholder="'招标任务已结束!'" />
-      </div>
-      <div v-else>
+      </div> -->
+      <div>
         <div class="left">
           <div class="left-main">
             <div class="left-card" v-if="sitem">
               <div class="page-main-title">需求信息</div>
               <ul class="page-main-ul clear">
                 <li>需求单号:</li>
-                <li>{{ queryId }}</li>
-                <li>截止时间:</li>
-                <li>{{ sitem.endtime }}</li>
-                <li>剩余时间:</li>
-                <li>{{ sitem.num }}{{ sitem.unit_name }}</li>
+                <li>{{ sitem.reqCode }}</li>
+                <li>任务截止时间:</li>
+                <li>{{ sitem.req_endtime }}</li>
+                <li>任务剩余时间:</li>
+                <li>--</li>
                 <li>需求公司:</li>
-                <li>{{ sitem.original_price }}元</li>
-                <li>创建人:</li>
-                <li>{{ sitem.salesman }}</li>
+                <li>{{ sitem.companyNama || '--' }}</li>
+                <li>需求创建人:</li>
+                <li>{{ sitem.req_user_name || '--' }}</li>
                 <li>联系方式:</li>
-                <li>{{ sitem.arrival_time }}</li>
+                <li>{{ sitem.req_tel || "--" }}</li>
               </ul>
             </div>
             <div class="left-card" v-if="sitem">
               <div class="page-main-title">活动要求</div>
               <ul class="page-main-ul clear">
                 <li>项目预算:</li>
-                <li>{{ sitem.good_name }}</li>
+                <li>{{ sitem.budget }}</li>
                 <li>活动城市:</li>
-                <li>{{ sitem.total_weight }}g</li>
+                <li>{{ sitem.shortname }}</li>
                 <li>需求项目:</li>
-                <li>{{ sitem.is_addrs + "" === "1" ? "多地" : "一地" }}</li>
+                <li>{{ sitem.req_demand}}</li>
                 <li>活动人数:</li>
-                <li>{{ sitem.is_custom + "" === "1" ? "定制" : "非定制" }}</li>
+                <li>{{ sitem.participant }}</li>
                 <li>活动需求:</li>
-                <li>{{ sitem.use_desc }}</li>
+                <li>{{ sitem.require_item }}</li>
                 <li>活动时间:</li>
-                <li>{{ sitem.remark }}</li>
+                <li>{{ sitem.act_time }}</li>
               </ul>
             </div>
           </div>
@@ -46,7 +46,7 @@
         <div class="p-right">
           <el-collapse v-model="actives">
             <el-collapse-item title="评估预算函" name="1">
-              <settlement-budget-letter title="预算" />
+              <evalute-budget-letter :planList="planList" :readonly="Number(sitem.status) !== 1" :sitem="sitem" @refresh="initForm" />
             </el-collapse-item>
 
             <el-collapse-item title="活动方案管理" name="2">
@@ -60,9 +60,6 @@
         </div>
       </div>
     </div>
-    <div v-else>
-      <no-auth></no-auth>
-    </div>
   </div>
 </template>
 <script>
@@ -70,14 +67,15 @@ import asyncRequest from "@/apis/service/customerService/workbench";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 import baseForm from "./components/baseForm";
+import EvaluteBudgetLetter from "./components/evaluateBudgetLetter/index.vue"
 import PlanBudgetLetter from "./components/planBudgetLetter/index.vue"
 export default {
   name: "workbenchDetail",
   components: {
     baseForm,
-    PlanBudgetLetter
+    PlanBudgetLetter,
+    EvaluteBudgetLetter
   },
-
   mixins: [resToken],
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
@@ -107,6 +105,7 @@ export default {
       newTime: "",
       editId: "add",
       editType: "wait",
+      planList:[],
       parmValue: {
         page: 1,
         size: 100,
@@ -131,72 +130,24 @@ export default {
       this.editType = "wait";
       const { id } = this.$route.query;
       this.queryId = id;
-      console.log(this.queryId);
       this.loading = true;
 
       await this.initData();
-      await this.searchList();
-
+      await this.searchPlanList()
       this.loading = false;
     },
 
     async initData() {
       const { code, message, data } = await asyncRequest.detail({
-        infoNo: this.queryId,
+        id: this.queryId,
       });
-      if (code === 0) {
-        const { status } = data;
-        this.status = status;
-        this.sitem = JSON.parse(JSON.stringify(data));
-
-        const { can } = this.sitem;
-        this.sitem.is_metal = "";
-        this.sitem.can_id_arr = [];
-        this.sitem.can_name = "";
-        let can_name = "",
-          can_id_arr = [],
-          is_metal = false;
-        can.forEach((e, i) => {
-          can_name += i == 0 ? e.name : `_${e.name}`;
-          can_id_arr.push(e.id);
-          if (e.id === "6") {
-            is_metal = true;
-          }
-        });
-        this.sitem.is_metal = is_metal;
-        this.sitem.can_id_arr = can_id_arr;
-        this.sitem.can_name = can_name;
+      if (code === 1) {
+        this.sitem = data
         this.getNewTime();
-        await this.well_timer();
-      } else if (code >= 100 && code <= 104) {
-        await this.logout();
-      } else {
+      }  else {
         this.$message.warning(message);
       }
     },
-    async well_timer() {
-      this.timer = setInterval(async () => {
-        if (this.num !== 0) {
-          this.num--;
-        } else {
-          if (this.timer) {
-            const { code, status, message } = await this.repeat_initData();
-            if (code === 0 && status + "" === "1") {
-              this.num = 60;
-            } else if (code === 0 && status !== "1") {
-              this.status = status;
-              this.clearTime();
-            } else if (code >= 100 && code <= 104) {
-              this.clearTime();
-              await this.logout();
-            } else {
-              this.clearTime();
-              this.$message.warning(message);
-            }
-          }
-        }
-      }, 1000);
-    },
     clearTime() {
       if (this.timer) {
         clearInterval(this.timer);
@@ -222,21 +173,19 @@ export default {
       this.editType = type;
       this.getNewTime();
     },
-    // 刷新表格
-    async searchList() {
-      this.loading = true;
-      this.parmValue.infoNo = this.queryId;
-
-      const { code, data, message } = await asyncRequest.good_list(this.parmValue);
-      if (code === 0) {
-        const { list } = data;
-        this.tableData = list;
-      } else if (code >= 100 && code <= 104) {
-        await this.logout();
-      } else {
-        this.tableData = [];
+    async searchPlanList(){
+      const { code, data } = await asyncRequest.planList({
+        req_id: this.sitem.id,
+        size:15
+      });
+      if (code === 1) {
+        const { list, count } = data;
+        this.planList = list
+        this.pageInfo.total = count
+      }  else {
+        this.list = [];
+        this.pageInfo.total = 0;
       }
-      this.loading = false;
     },
   },
 };
@@ -262,7 +211,7 @@ export default {
       position: absolute;
       top: 16px;
       left: 16px;
-      width: 220px;
+      width: 280px;
       overflow: hidden;
       height: calc(100vh - 82px);
       .left-main {
@@ -279,7 +228,7 @@ export default {
       top: 16px;
       right: 16px;
       padding:0px 10px 10px 10px;
-      width: calc(100% - 258px);
+      width: calc(100% - 318px);
       height: calc(100vh - 276px);
       overflow-y: scroll;
       background: #fff;
@@ -341,11 +290,11 @@ export default {
           line-height: 25px;
 
           &:nth-child(2n + 1) {
-            width: 60px;
+            width: 90px;
             text-align: right;
           }
           &:nth-child(2n + 2) {
-            width: calc(100% - 60px);
+            width: calc(100% - 110px);
           }
         }
       }

+ 52 - 169
src/views/customerService/workbench/index.vue

@@ -1,13 +1,12 @@
 <template>
   <div class="workbench">
-    <div class="workbench-main" v-loading="loading" v-if="powers.some((i) => i == '001')">
+    <div class="workbench-main" v-loading="loading">
         <div class="workbench-main__search">
-          <div style="width: 100%">
-            <el-row style="padding: 0 0 0 80px">
+          <el-row>
               <el-col :span="4" style="width: 351px;">
                 <period-date-picker
-                  :start="parmValue.createStart"
-                  :end="parmValue.createEnd"
+                  :start="parmValue.addtime_start"
+                  :end="parmValue.addtime_end"
                   :width="'160px'"
                   :size="searchSize"
                   placeholder="创建"
@@ -15,16 +14,6 @@
                 />
               </el-col>
 
-              <el-col :span="4" style="width:200px">
-                <el-select v-model="parmValue.activityPerson" size="mini" placeholder="活动人数" @change="
-                pageInfo.curr = 1;
-                parmValue.page = 1;
-                searchList();
-               ">
-                  <el-option />
-                </el-select>
-              </el-col>
-
               <el-col :span="4" style="width:200px">
                 <el-select v-model="parmValue.city" size="mini" placeholder="活动城市" @change="
                 pageInfo.curr = 1;
@@ -61,8 +50,8 @@
             <el-row style="margin-top:10px">
               <el-col :span="4" style="width: 341px;">
                 <period-date-picker
-                  :start="parmValue[activityStart]"
-                  :end="parmValue[activityEnd]"
+                  :start="parmValue[act_start]"
+                  :end="parmValue[act_end]"
                   :width="'154px'"
                   :size="searchSize"
                   @timeReturned="evt => handleTime(evt,'activity')"
@@ -71,7 +60,7 @@
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
-                <el-select v-model="parmValue.currentStatus" style="width:100%" size="mini" placeholder="当前状态" @change="
+                <el-select v-model="parmValue.status" style="width:100%" size="mini" placeholder="当前状态" @change="
                 pageInfo.curr = 1;
                 parmValue.page = 1;
                 searchList();
@@ -94,8 +83,8 @@
             <el-row style="margin-top:10px">
               <el-col :span="4" style="width: 341px;">
                 <period-date-picker
-                  :start="parmValue.consultationStart"
-                  :end="parmValue.consultationEnd"
+                  :start="parmValue.req_start"
+                  :end="parmValue.req_end"
                   :width="'154px'"
                   :size="searchSize"
                   @timeReturned="evt => handleTime(evt,'consultation')"
@@ -104,7 +93,7 @@
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
-                <el-input v-model="parmValue.mobile" size="mini" placeholder="联系电话" @change="
+                <el-input v-model="parmValue.req_tel" size="mini" placeholder="联系电话" @change="
                 pageInfo.curr = 1;
                 parmValue.page = 1;
                 searchList();
@@ -112,7 +101,7 @@
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
-                <el-input size="mini" placeholder="需求编号" v-model="parmValue.demandNo" @change="
+                <el-input size="mini" placeholder="需求编号" v-model="parmValue.reqCode" @change="
                 pageInfo.curr = 1;
                 parmValue.page = 1;
                 searchList();
@@ -150,92 +139,6 @@
                 </el-select>
               </el-col>
             </el-row>
-
-          </div>
-
-          <el-row style="margin-top:10px">
-            <el-col :span="4" style="width: 341px;">
-              <period-date-picker
-                :start="parmValue[activityStart]"
-                :end="parmValue[activityEnd]"
-                :width="'154px'"
-                :size="searchSize"
-                @timeReturned="evt => handleTime(evt,'activity')"
-                placeholder="活动"
-              />
-            </el-col>
-            <el-col :span="4" style="margin-right:10px">
-              <el-select v-model="parmValue.currentStatus" style="width:100%" size="mini" placeholder="当前状态" @change="
-              pageInfo.curr = 1;
-              parmValue.page = 1;
-              searchList();
-             ">
-                <el-option />
-              </el-select>
-            </el-col>
-            <el-col :span="4">
-              <el-select  v-model="parmValue.activityDemand" style="width:100%" size="mini" placeholder="活动需求" @change="
-              pageInfo.curr = 1;
-              parmValue.page = 1;
-              searchList();
-             ">
-                <el-option />
-              </el-select>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top:10px">
-            <el-col :span="4" style="width: 341px;">
-              <period-date-picker
-                :start="parmValue.consultationStart"
-                :end="parmValue.consultationEnd"
-                :width="'154px'"
-                :size="searchSize"
-                @timeReturned="evt => handleTime(evt,'consultation')"
-                placeholder="咨询截止"
-              />
-            </el-col>
-            <el-col :span="4" style="margin-right:10px">
-              <el-input v-model="parmValue.mobile" size="mini" placeholder="联系电话" @change="
-              pageInfo.curr = 1;
-              parmValue.page = 1;
-              searchList();
-             "/>
-            </el-col>
-            <el-col :span="4" style="margin-right:10px">
-              <el-input size="mini" placeholder="需求编号" v-model="parmValue.demandNo" @change="
-              pageInfo.curr = 1;
-              parmValue.page = 1;
-              searchList();
-             "/>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top:10px">
-            <el-col :span="4">
-              <el-select size="mini" style="width:100%" placeholder="需求项目" v-model="parmValue.demandProject" @change="
-              pageInfo.curr = 1;
-              parmValue.page = 1;
-              searchList();
-             ">
-                <el-option />
-              </el-select>
-            </el-col>
-            <el-col :span="4" style="margin-left:10px">
-              <el-input size="mini" placeholder="需求创建人" v-model="parmValue.demandCreator" @change="
-              pageInfo.curr = 1;
-              parmValue.page = 1;
-              searchList();
-             "/>
-            </el-col>
-            <el-col :span="4" style="margin-left:10px">
-              <el-select size="mini" placeholder="需求企业" v-model="parmValue.demandEnterprise" @change="
-              pageInfo.curr = 1;
-              parmValue.page = 1;
-              searchList();
-             ">
-                <el-option />
-              </el-select>
-            </el-col>
-          </el-row>
         </div>
 
       <ul class="clear po-ul">
@@ -245,15 +148,15 @@
               class="task-card"
               v-for="item in list"
               :key="item"
-              @click="wantTo(item.infoNo)"
+              @click="wantTo(item.id)"
             >
               <div class="task-card__header">
-                <h3>泰康人寿总公司北京分公司</h3>
-                <p>北京</p>
+                <h3>{{item.companyName || "--"}}</h3>
+                <p>{{item.shortname}}</p>
               </div>
 
               <div class="task-card__content">
-                大型活动(1000以上),场地+用餐+住宿,表彰会
+                {{item.participant}},{{item.req_demand}}
               </div>
 
               <div class="task-card__footer">
@@ -265,7 +168,7 @@
                   <li class="line">|</li>
                   <li>
                     <i class="el-icon-user" />
-                    2
+                    {{ item.req_user_name || '--' }}
                   </li> 
                 </ul>
               </div>
@@ -275,7 +178,6 @@
         </li>
       </ul>
     </div>
-    <no-auth v-else></no-auth>
     <!-- 弹窗 新增/修改 -->
     <add-edit
       :id="modelId"
@@ -292,7 +194,7 @@ import roleLevel from "@/assets/js/roleLevel";
 import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";
 import resToken from "@/mixins/resToken";
-import { createEmptyStringObject } from '../../../utils/static';
+import dayjs from "dayjs"
 
 /**
 * @props
@@ -356,19 +258,20 @@ export default {
       sitem: {},
       list1: [],
       list: [],
+      mapTimer:{},
       parmValue: {
-        createStart:"", //创建开始时间
-        createEnd:"", //创建结束时间
-        activityStart:"", //活动开始时间
-        activityEnd:"", //活动结束时间
-        consultationStart:"", //咨询开始时间
-        consultationEnd:"", //咨询结束时间
+        addtime_start:"", //创建开始时间
+        addtime_end:"", //创建结束时间
+        act_start:"", //活动开始时间
+        act_end:"", //活动结束时间
+        req_start:"", //咨询开始时间
+        req_end:"", //咨询结束时间
         activityPerson:"",//活动人数
-        activityCity:"", //活动城市,
-        currentStatus:"", //当前状态,
-        mobile:"", //联系电话
+        city:"", //活动城市,
+        status:"", //当前状态,
+        req_tel:"", //联系电话
         activityDemand:"", //活动需求
-        demandNo:"", //需求编号
+        reqCode:"", //需求编号
         demandProject:"", //需求项目
         demandCreator:"", //需求创建人
         demandEnterprise:"", //需求企业
@@ -436,28 +339,26 @@ export default {
     }
   },
   methods: {
-    wantTo(infoNo) {
-      if (this.powers.some((i) => i == "007")) {
-        this.routeGoto("workbenchDetail", { id: infoNo });
-      }
+    wantTo(id) {
+      this.routeGoto("workbenchDetail", { id });
     }, 
     restSearch() {
       this.customerCode = [];
       this.select = "1";
       this.s_input = "";
       this.parmValue = {
-        createStart:"", //创建开始时间
-        createEnd:"", //创建结束时间
-        activityStart:"", //活动开始时间
-        activityEnd:"", //活动结束时间
-        consultationStart:"", //咨询开始时间
-        consultationEnd:"", //咨询结束时间
+        addtime_start:"", //创建开始时间
+        addtime_end:"", //创建结束时间
+        act_start:"", //活动开始时间
+        act_end:"", //活动结束时间
+        req_start:"", //咨询开始时间
+        req_end:"", //咨询结束时间
         activityPerson:"",//活动人数
-        activityCity:"", //活动城市,
-        currentStatus:"", //当前状态,
-        mobile:"", //联系电话
+        city:"", //活动城市,
+        status:"", //当前状态,
+        req_tel:"", //联系电话
         activityDemand:"", //活动需求
-        demandNo:"", //需求编号
+        reqCode:"", //需求编号
         demandProject:"", //需求项目
         demandCreator:"", //需求创建人
         demandEnterprise:"", //需求企业
@@ -564,11 +465,7 @@ export default {
     },
         // 时间选择事件
     async handleTime(e,field) {
-      // const startProp = mapFields[`${prefix}Start`]
-      // const endProp = mapFields[`${prefix}End`]
-
       const { start:startProp,end:endProp } = mapDateFields[field]
-      
       if (e.startTime !== "") {
         this.parmValue[startProp] = e.startTime;
       } else {
@@ -586,7 +483,7 @@ export default {
       }
     },
     // 刷新表格
-    async searchList(type) {
+    async searchList() {
       if (!this.loading) {
 
       for(const field of Object.keys(mapDateFields)){
@@ -604,29 +501,14 @@ export default {
         this.loading = true;
         const { code, data } = await asyncRequest.list({
           ...this.parmValue,
-          needRela: true,
+          size:15
         });
 
-        if (code === 0) {
+        if (code === 1) {
           const { list, count } = data;
-          this.list = list;
-          this.list.map((e) => {
-            e.cat_name = "";
-            if (e.can && e.can.length > 0) {
-              e.can.forEach((a, ai) => {
-                e.cat_name += `${ai !== 0 ? "_" : ""}${a.name}`;
-              });
-            }
-            return e;
-          });
-
-          this.pageInfo.total = Number(count);
-          if (type) {
-            await this.well_timer();
-          }
-        } else if (code >= 100 && code <= 104) {
-          await this.logout();
-        } else {
+          this.list = list
+          this.pageInfo.total = count
+        }  else {
           this.list = [];
           this.pageInfo.total = 0;
         }
@@ -647,7 +529,6 @@ export default {
   background: #f0f2f5;
   padding: 16px;
   .workbench-main {
-
     &__search{
       background: #ffffff;
       padding: 10px;
@@ -655,7 +536,7 @@ export default {
 
     position: relative;
     width: 100%;
-    height: 100%;
+    // height: 100%;
     box-sizing: border-box;
     ul.po-ul {
       width: 100%;
@@ -672,8 +553,9 @@ export default {
         // border: 1px solid rgba(121, 121, 121, 1);
         .task-card {
           cursor: pointer;
-          border-bottom: 1px dashed #e6ebf5;
-          border-left: 1px dashed #e6ebf5;
+          border: 1px dashed #ccc;
+          margin-left:-1px;
+          margin-top:-1px;
           line-height: 20px;
           overflow: hidden;
           width: 100%;
@@ -795,6 +677,7 @@ export default {
 .taskList{
   display: flex;
   flex-wrap: wrap;
-  justify-content: space-between;
+  
+  // justify-content: space-between;
 }
 </style>