Просмотр исходного кода

feat:预算函文件上传取消

snow 1 год назад
Родитель
Сommit
e5801db1ea

+ 6 - 10
.DS_Store

@@ -1,32 +1,28 @@
 // 物业管理员
 import http from "@/apis/axios";
-const api = "admin/";
+const api = "admin/orderInvoice/";
+
 export default {
   // 详情
-  detail: (data, params) => http(api + "bragaininfo", data, "post", params),
+  detail: (data, params) => http(api + "info", 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),
+  create: (data, params) => http(api + "create", data, "post", params),
+ // 分页查询
+  list: (data, params) => http(api + "list", data, "post", params),
   // 分页查询项目列表
   plist: (data, params) => http(api + "projectlist", data, "post", params),
-
   // 删除
   delete: (data, params) => http(api + "delete", data, "post", params),
- 
   // 项目详情
   pdetail: (data, params) => http(api + "projectinfo", data, "post", params),
   // 议价单创建
   bargain_add: (data, params) => http(api + "consultbaradd", data, "post", params),
-
   // 异常原因接口
   reasonList: (data, params) => http(api + "resultlist", data, "post", params),
   // 物流反馈

+ 3 - 3
src/apis/service/customerService/invoiceApproval/index.js

@@ -1,6 +1,6 @@
 // 物业管理员
 import http from "@/apis/axios";
-const api = "admin/";
+const api = "admin/platformSettel/";
 export default {
   // 详情
   detail: (data, params) => http(api + "bragaininfo", data, "post", params),
@@ -10,8 +10,8 @@ export default {
   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),
+  // 分页查询
+  list: (data, params) => http(api + "list", data, "post", params),
 
 
   // 添加

+ 26 - 17
src/apis/service/sellOut/bargainList/index.js

@@ -1,24 +1,33 @@
 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:'订单已取消'}
+  { 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 invoiceTypeList = [
+  { value:'1', label:'增值税普通发票',scanValue: '04' },
+  { value:'2', label:'增值税专用发票',scanValue: '01' },
+  { value:'3', label:'增值税电子普通发票', scanValue: '10' },
+  { value:'4', label:'增值税电子专用发票', scanValue:' 20' },
+  { value:'5', label:'电子发票(增值税普通发票)',scanValue: '32' },
+  { value:'6', label:'电子发票(增值税专用发票)',scanValue: '31' },
 ]
 
 export const budgetStatusOptions = [
-  {value:"1",label:"待上传方案"},
-  {value:"2",label:"待上传计划预算"},
-  {value:"3",label:"待客户确认"},
-  {value:"4",label:"客户确认完成"}
+  { value:"1", label:"待上传方案" },
+  { value:"2", label:"待上传计划预算" },
+  { value:"3", label:"待客户确认" },
+  { value:"4", label:"客户确认完成" }
 ]
 
 const statusList = [

+ 6 - 0
src/assets/sheji/developing.jpg


+ 162 - 0
src/components/data-table/src/demand.vue

@@ -0,0 +1,162 @@
+<template>
+    <show-data-table
+      style="margin-bottom:10px"
+      :newTime="newTime"
+      :sitem="demandInfo"
+      :columns="demandDetailColumns"
+    >
+      <template #currentStatus>
+        <el-tag size="mini" style="margin-left:5px">
+          {{(demandStatusOptions.find(({value}) => value === String(demandInfo.status)) || {}).label || '--'}}
+        </el-tag>
+      </template>
+
+      <template #prepaymentType>
+        <p style="margin-left:5px">
+          {{demandInfo.prepay_type}}
+        </p>
+      </template>
+    </show-data-table>
+</template>
+
+<script>
+import { demandStatusOptions } from '@/assets/js/statusList'
+import demandRequest from "@/apis/service/customerService/demandOrder";
+export default {
+  props: ['id'],
+  name:'DemandDetail',
+  data(){
+    return {
+      loading:false,
+      demandInfo:{},
+      demandStatusOptions,
+      demandDetailColumns:[
+        {
+          prop:'reqCode',
+          label:"需求订单编号",
+          span:8
+        },
+        {
+          prop:'req_user_name',
+          label:'创建人',
+          span:8
+        },
+        {
+          prop:'create_time',
+          label:'创建时间',
+          span:8
+        },
+        {
+          prop:'shortname',
+          label:'活动城市',
+          span:8
+        },
+        {
+          prop:'require_item',
+          label:'活动需求',
+          span:8
+        },
+        {
+          prop:'act_time',
+          label:'活动时间',
+          span:8
+        },  
+        {
+          prop:'participant',
+          label:'活动人数',
+          span:8
+        },
+        {
+          prop:'req_demand',
+          label:'项目需求',
+          span:8
+        },
+        {
+          prop:'req_endtime',
+          label:'招标截止时间',
+          span:8
+        },
+        {
+          prop: 'companyName',
+          label: '需求公司',
+          span:8
+        },
+        {
+          prop:'flow_stage',
+          label:'当前阶段',
+          span:8
+        },
+        {
+          prop:'supplierName',
+          label:'活动执行供应商',
+          span:8
+        },
+        {
+          prop:'budget',
+          label:'需求预算',
+          span:8
+        },
+        {
+          prop:'TODO',
+          label:'预付类型',
+          span:8,
+          _slot_:'prepaymentType'
+        },
+        {
+          label:'预付金额',
+          span:8,
+          _slot_:'prepaymentAmount'
+        },
+        {
+          prop:'ainv_fee',
+          label:'已开票金额',
+          span:6
+        },
+        {
+          prop:'winv_fee',
+          label:'未开票金额',
+          span:6
+        },
+        {
+          prop:'apay_amount',
+          label:'已付款金额',
+          span:6
+        },
+        {
+          prop:'wpay_amount',
+          label:'未付款金额',
+          span:6
+        },
+        {
+          prop:'settle_amount',
+          label:'活动结算金额',
+          span:6
+        },
+        {
+          label:'当前状态',
+          span:18,
+          _slot_:'currentStatus'
+        }
+      ]
+    }
+  },
+  watch:{
+    id:{
+      handler(id){
+        if(!id) return
+        this.getDemandDetail(id)
+      },
+      immediate:true
+    }
+  },
+  methods:{
+    async getDemandDetail(id){
+      this.loading = true
+      const { data, code } = await demandRequest.detail({ id })
+      this.loading = false
+      if(code !== 1) return
+      this.demandInfo = data
+    }
+  }
+}
+</script>

+ 6 - 4
src/components/dynamic-tags/index.vue

@@ -9,8 +9,8 @@
       <search-store size="mini" :value.sync="storeId" />
     </div>
 
-    <div style="display:flex;align-items:center">
-      <p style="margin-right:10px"><span style="color:red"> * </span>{{mapTitle[type]}}:</p>
+    <div style="display:flex;align-items:center" v-if="type !== 'budget' && type !== 'project'">
+      <p style="margin-right:10px"><span style="color:red"> * </span>{{mapTitle[type]}}文件:</p>
       <div v-if="file_url && isFile">
         <el-tooltip content="点击下载" placement="top">
           <a style="color:#409EFF" :href="file_url">{{file_name}}</a>
@@ -271,7 +271,10 @@ export default {
         return
       }
 
-      if(this.isFile && !this.file_url){
+      if((this.isFile && !this.file_url) && (
+        this.type !== 'budget' &&
+        this.type !== 'project'
+      )){
         this.$message.warning('请上传文件!')
         return
       }
@@ -281,7 +284,6 @@ export default {
         return
       }
 
-
       const planinfo = this.tableData.map(tableItem => requsetFields.reduce((prev, currentKey) => ({
         ...prev,
         [currentKey]: tableItem[currentKey]

+ 1 - 0
src/components/search-good-modal/columns.js

@@ -21,6 +21,7 @@
 
 
 <script>
+
 import asyncRequest from "@/apis/components/search"
 export default {
   name:'SearchActivityType',

+ 1 - 1
src/components/search/src/addr.vue

@@ -45,7 +45,7 @@ export default {
   },
   methods:{
     async onFetch(title = ""){
-      const {code, data} = await asyncRequest.title({ title })
+      const {code, data} = await asyncRequest.title({ quick_search:title })
       if(code !== 1) return
       this.list = data.list
     }

+ 4 - 1
src/components/show-good-data-modal/ShowDataTableColumns.js

@@ -4,6 +4,8 @@ import { TableEditor } from "@/components/tableEditor"
 
 import searchComponents from "@/components/search"
 
+import detailComponents from "@/components/data-table"
+
 const components = [
   NormalNode,
   CredentialsNode,
@@ -19,7 +21,8 @@ const components = [
 export const setupComponets = function(app){
   [
     ...components,
-    ...searchComponents
+    ...searchComponents,
+    ...detailComponents
   ].forEach(component => {
     app.component(component.name,component)
   })

+ 27 - 7
src/router/index.js

@@ -27,14 +27,16 @@ const listCol = [
   },
 
   {
-    prop: 'req_demand',
+    prop: 'req_demand_name',
     label: '项目需求',
-    width: '120px'
+    width: '120px',
+    _slot_:'req_demand'
   },
   {
     prop: 'participant',
     label: '活动人数',
-    width: '155'
+    width: '155',
+    _slot_: "participant"
   },
 
   {
@@ -167,7 +169,6 @@ const demandDetailColumns = [
     _slot_:'prepaymentType'
   },
   {
-    prop:'TODO',
     label:'预付金额',
     span:8,
     _slot_:'prepaymentAmount'
@@ -175,12 +176,31 @@ const demandDetailColumns = [
   {
     prop:'settle_amount',
     label:'活动结算金额',
-    span:8
+    span:6
+  },
+  {
+    prop:'ainv_fee',
+    label:'已开票金额',
+    span:5
+  },
+  {
+    prop:'winv_fee',
+    label:'未开票金额',
+    span:4
+  },
+  {
+    prop:'apay_amount',
+    label:'已付款金额',
+    span:5
+  },
+  {
+    prop:'wpay_amount',
+    label:'未付款金额',
+    span:4
   },
   {
-    prop:'TODO',
     label:'当前状态',
-    span:16,
+    span:24,
     _slot_:'currentStatus'
   }
 ]

+ 6 - 16
src/views/customerService/demandOrder/components/demandDetail/index.vue

@@ -7,43 +7,33 @@
            <el-collapse-item title="需求订单详情" name="1">
              <demand-detail :sitem="sitem" @refresh="refresh" @switchNode="handleSwitchNode" />
            </el-collapse-item>
-
            <el-collapse-item title="评估预算函管理" name="2" v-if="Number(sitem.status) === 1">
              <manage-budgeet-letter :sitem="sitem" @selectedChange="handleSelectedChange($event,'budget')" />
            </el-collapse-item> 
-           
            <el-collapse-item title="活动方案管理" name="3" v-if="Number(sitem.status) === 2">
              <manage-activity-scheme :sitem="sitem" @selectedChange="handleSelectedChange($event,'activity')" />
            </el-collapse-item> 
-           
            <el-collapse-item title="计划预算函管理" name="10" v-if="Number(sitem.status) === 3">
              <manage-project-letter :sitem="sitem" @selectedChange="handleSelectedChange($event,'project')" />
            </el-collapse-item> 
-          
            <el-collapse-item title="待客户上传确认凭证" name="4" v-if="Number(sitem.status) === 4">
               <credentials-node @confirm="handleCustomerConfirm($event)" />
            </el-collapse-item>
-           
            <el-collapse-item title="待平台审核执行凭证" name="5" v-if="Number(sitem.status) === 5">
              <wait-execute-certificate :sitem="sitem" @refresh="initData" />
            </el-collapse-item>
-           
            <el-collapse-item title="待供应商确认已执行" name="6" v-if="Number(sitem.status) === 6">
              <wait-supplier-confirm :sitem="sitem" @refresh="initData"  />
            </el-collapse-item> 
-           
            <el-collapse-item title="待客户确认已执行" name="7" v-if="Number(sitem.status) === 7">
              <wait-customer-confirm :sitem="sitem" @refresh="initData" />
            </el-collapse-item>
-
            <el-collapse-item title="待供应商上传结算函" name="8" v-if="Number(sitem.status) === 9">
              <letter type="settlement" :requsetMethod="handleUploadLetter" :isFile="true" />
            </el-collapse-item>
-
           <el-collapse-item title="结算函" name="8" v-if="Number(sitem.status) > 9 && Number(sitem.status) !== 11">
              <letter :id="sitem.id" type="settlement" status="4" :requsetMethod="handleUploadLetter" :isFile="true" :readonly="true" />
            </el-collapse-item> 
-
            <el-collapse-item title="待客户确认结算函" name="9" v-if="Number(sitem.status) === 10">
              <normal-node @confirm="handleConfirmSettlement" />
            </el-collapse-item>
@@ -74,23 +64,23 @@ import resToken from "@/mixins/resToken";
 export default {
   components: { 
     DemandDetail, 
+    SettlementLetter,
+    ManageProjectLetter,
     ManageBudgeetLetter, 
     WaitSupplierConfirm, 
     WaitCustomerConfirm, 
     ManageActivityScheme, 
-    WaitExecuteCertificate,
-    ManageProjectLetter,
-    SettlementLetter
+    WaitExecuteCertificate
   },
   name: "demandOrderDetail",
-  mixins: [resToken,privateField],
+  mixins: [resToken, privateField],
   computed: {
     ...mapGetters([
       "tablebtnSize", 
       "searchSize",
-      "size",
       "private_field", 
-      "isSupertube"
+      "isSupertube",
+      "size",
     ]),
     powers() {
       const { btnList } = this.$store.getters;

+ 23 - 20
src/views/customerService/demandOrder/index.vue

@@ -94,7 +94,8 @@
                 parmValue.page = 1;
                 searchList();
                ">
-                  <el-option v-for="status in demandStatusOptions" 
+                  <el-option 
+                    v-for="status in demandStatusOptions" 
                     :key="status.value" 
                     :value="status.value" 
                     :label="status.label"
@@ -112,31 +113,19 @@
             </el-row>
 
             <el-row style="margin-top:10px">
-              <!-- <el-col :span="4" style="width: 341px;">
-                <period-date-picker
-                  :start="parmValue.req_start"
-                  :end="parmValue.req_end"
-                  :width="'154px'"
-                  :size="searchSize"
-                  @timeReturned="evt => handleTime(evt,'consultation')"
-                  placeholder="咨询截止"
-                />
-              </el-col> -->
-
-
               <el-col :span="4" style="margin-right:10px">
                 <el-input size="mini" placeholder="需求编号" v-model="parmValue.reqCode" @change="
-                pageInfo.curr = 1;
-                parmValue.page = 1;
-                searchList();
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
                "/>
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
                 <el-input v-model="parmValue.req_tel" size="mini" placeholder="联系电话" @change="
-                pageInfo.curr = 1;
-                parmValue.page = 1;
-                searchList();
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
                "/>
               </el-col>
 
@@ -145,7 +134,8 @@
                    pageInfo.curr = 1;
                    parmValue.page = 1;
                    searchList();
-                  " />
+                  " 
+                />
               </el-col>
             </el-row>
 
@@ -162,6 +152,19 @@
 
           </div>
         </template>
+        <template #req_demand="{scope}">{{
+          scope.row.req_demand_name.map(({name}) => name).join(" + ")
+          }}</template>
+
+          <template #participant="{ scope }">
+            <span v-if="Number(scope.row.participant_max) === 0">{{
+              scope.row.participant_min
+            }}+</span>
+
+            <span v-else>
+              {{scope.row.participant_min}} ~ {{scope.row.participant_max}}
+            </span>
+          </template>
         <template #status="{ scope }">
           <el-tag
             :size="tablebtnSize"

+ 16 - 15
src/views/customerService/invoiceApply/columns.js

@@ -1,10 +1,10 @@
 
 const statusList = [
-  { id: '0', label: '待业务主管审核', type: '' },
-  { id: '1', label: '业务主管已通过', type: 'success' },
-  { id: '2', label: '业务主管已驳回', type: 'danger' },
-  { id: '3', label: '业务主管越线通过', type: 'warning' },
-  { id: '4', label: '取消议价', type: 'info' }
+  { id: '1', label: '待平台结算', type: '' },
+  { id: '2', label: '待服务商上传发票', type: '' },
+  { id: '3', label: '部分回票', type: '' },
+  { id: '4', label: '全部回票,待客户确认完成', type: '' },
+  { id: '5', label: '开票申请完成', type: 'success' }
   // 已选完商品,取消议价
 ]
 const demandColumns = [
@@ -17,15 +17,15 @@ const demandColumns = [
 
 const listCol = [
   {
-    prop: 'TODO',
+    prop: 'invNo',
     label: '开票申请编号',
-    width: '155'
+    width: '105px'
   },
 
   {
-    prop: 'TODO',
+    prop: 'reqCode',
     label: '需求订单编号',
-    width: '155'
+    width: '185px'
   },
 
   {
@@ -34,23 +34,24 @@ const listCol = [
     width: '120px'
   },
   {
-    prop: 'todo',
+    prop: 'total_price',
     label: '申请金额',
     width: '155'
   },
 
   {
-    prop: 'todo',
+    prop: 'invoice_type',
     label: '发票类型',
-    width: '155px'
+    width: '155px',
+    _slot_: 'invoice_type'
   },
   {
-    prop: 'todo',
+    prop: 'invoice_title',
     label: '发票抬头',
     width: '155px'
   },
   {
-    prop: 'todo',
+    prop: 'invoice_code',
     label: '纳税识别号',
     'min-width': '180'
   },
@@ -77,7 +78,7 @@ const listCol = [
     fixed: 'right',
     _noset_: true,
     _slot_: 'operation',
-    width: 50
+    width: 80
   }
 ]
 

+ 22 - 4
src/views/customerService/invoiceApply/components/_columns.js

@@ -146,20 +146,38 @@ const demandDetailColumns = [
     _slot_:'prepaymentType'
   },
   {
-    prop:'TODO',
     label:'预付金额',
     span:8,
     _slot_:'prepaymentAmount'
   },
+  {
+    prop:'ainv_fee',
+    label:'已开票金额',
+    span:6
+  },
+  {
+    prop:'winv_fee',
+    label:'未开票金额',
+    span:6
+  },
+  {
+    prop:'apay_amount',
+    label:'已付款金额',
+    span:6
+  },
+  {
+    prop:'wpay_amount',
+    label:'未付款金额',
+    span:6
+  },
   {
     prop:'settle_amount',
     label:'活动结算金额',
-    span:8
+    span:6
   },
   {
-    prop:'TODO',
     label:'当前状态',
-    span:16,
+    span:18,
     _slot_:'currentStatus'
   }
 ]

+ 55 - 31
src/views/customerService/invoiceApply/components/createInvoiceApply.vue

@@ -1,8 +1,8 @@
 <template>
-  <el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-position="left" label-width="95px" size="mini">
+  <el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-position="left" label-width="95px" size="mini" v-loading="loading">
       <el-row>
         <el-col :span="24">
-          <el-form-item label="需求订单" prop="demandOrder">
+          <el-form-item label="需求订单" prop="req_id">
             <el-input placeholder="请选择需求订单" @focus="demandVisible = true" v-if="!demandInfo"/>
             <div style="display:flex" v-else>
               <show-data-table
@@ -34,9 +34,9 @@
 
       <el-row gutter="20">
         <el-col :span="12">
-          <el-form-item label="申请总金额"  prop="applyAmount">
+          <el-form-item label="申请总金额"  prop="total_amount">
             <digital-input
-              :values="ruleForm.applyAmount"
+              :values="ruleForm.total_amount"
               :placeholder="'采购毛利率'"
               :min="0"
               :position="'right'"
@@ -48,25 +48,33 @@
             />
           </el-form-item>
 
-          <el-form-item label="发票类型" prop="invoiceType">
-            <el-select v-model="ruleForm.invoiceType" style="width:100%" placeholder="发票类型">
-              <el-option />
+          <el-form-item label="发票类型" prop="invoice_type">
+            <el-select v-model="ruleForm.invoice_type" style="width:100%" placeholder="发票类型">
+              <el-option 
+                v-for="invoice in invoiceTypeList" 
+                :key="invoice.value" 
+                :value="invoice.value" 
+                :label="invoice.label"  
+              />
             </el-select>
           </el-form-item>
 
+
           <el-form-item label="备注" prop="remark">
             <el-input placeholder="备注" v-model="ruleForm.remark" style="width:100%" type="textarea" />
           </el-form-item>
         </el-col>
 
         <el-col :span="12">
-          <el-form-item label="发票抬头" prop="invoiceTitle">
+          <el-form-item label="发票抬头" prop="invoice_id">
             <search-invoice-title 
-              :value.sync="ruleForm.invoiceTitle" 
+              :value.sync="ruleForm.invoice_id" 
               @change="_invoiceInfo => invoiceInfo = _invoiceInfo" 
               style="width:100%"
               placeholder="请选择发票抬头" 
-            />
+            >
+    
+            </search-invoice-title>
           </el-form-item>
 
           <show-data-table 
@@ -92,15 +100,16 @@
 import DemandModal from "./demandModal.vue"
 import { demandDetailColumns } from "./_columns"
 import demandRequest from "@/apis/service/customerService/demandOrder";
-import { demandStatusOptions } from '@/assets/js/statusList'
+import { demandStatusOptions, invoiceTypeList } from '@/assets/js/statusList'
+import asyncRequest from "@/apis/service/customerService/invoiceApply";
 
   /** 
   * @props
-  * demandOrder 需求订单
-  invoiceTitle /发票抬头
-  invoiceType 发票类型
-  applyAmount 申请总金额
-  remark // 备注
+  * req_id 需求订单
+    invoice_id /发票抬头
+    invoice_type 发票类型
+    total_amount 申请总金额
+    remark // 备注
   */
 
 export default {
@@ -109,7 +118,9 @@ export default {
   components:{ DemandModal },
   data(){
       return {
+        loading: false,
         demandStatusOptions,
+        invoiceTypeList,
         demandInfo : null,
         invoiceInfo: null,
         demandDetailColumns,
@@ -128,10 +139,11 @@ export default {
             {
               prop: 'tel',
               label: '地址、电话',
-              span:24
+              span:24,
+              // _slot_: 'tel'
             },
             {
-              prop: 'todo',
+              prop: 'bank_account',
               label: '开户行及账号',
               span:24
             }
@@ -139,35 +151,35 @@ export default {
           newTime:"",
           demandVisible: false,
           ruleForm:{
-            demandOrder:"",
-            invoiceTitle:"", //发票抬头
-            invoiceType:"", //发票类型
-            applyAmount:"", //申请总金额
+            req_id:"",
+            invoice_id:"", //发票抬头
+            invoice_type:"", //发票类型
+            total_amount:"", //申请总金额
             remark:"", // 备注
           },
           rules:{
-            invoiceTitle:[
+            invoice_id:[
               {
                 required:true,
                 trigger:'change',
                 message:'请输入发票抬头'
               }
             ],
-            demandOrder:[
+            req_id:[
                {
                 required:true,
                 trigger:'change',
                 message:'请选择需求订单'
               }
             ],
-            invoiceType:[
+            invoice_type:[
               {
                 required:true,
                 trigger:'change',
                 message:'请选择发票类型'
               }
             ],
-            applyAmount:[
+            total_amount:[
               {
                 required:true,
                 trigger:'change',
@@ -188,18 +200,30 @@ export default {
     async onSubmit(){
       try {
         await this.$refs.ruleForm.validate()
-        this.$emit('confirm',this.ruleForm)
-      }catch(err){
+        const applyAmount = this.ruleForm.total_amount
+        const winvAmount = this.demandInfo.winv_fee
+        
+        if(Number(applyAmount) > Number(winvAmount)){
+          this.$message.warning('申请总金额不能超过未开票金额')
+          return
+        }
+
+        this.loading = true
+        const { code } = await asyncRequest.create(this.ruleForm)
+        this.loading = false
+        if(code !== 1) return
+        this.$router.push("/customerService/invoiceApply")
+        }catch(err){
         console.log(err)
       }
     },
     number_change(e) {
-      this.ruleForm.applyAmount = e || 0
+      this.ruleForm.total_amount = e || 0
     },
     async handleDemandChange(demandInfo){
       if(!demandInfo){
         this.demandInfo = null
-        this.ruleForm.demandOrder = ""
+        this.ruleForm.req_id = ""
         return
       }
       
@@ -208,7 +232,7 @@ export default {
       this.demandLoading = false
       if(code !== 1) return
       this.demandInfo = data
-      this.ruleForm.demandOrder = data.id
+      this.ruleForm.req_id = data.id
     } 
   }
 }

+ 3 - 2
src/views/customerService/invoiceApply/components/demandModal.vue

@@ -52,7 +52,7 @@
 
 <script>
 import pageInfo from "@/mixins/elPaginationHandle"
-import asyncRequest from "@/apis/service/customerService/demandOrder";
+import asyncRequest from "@/apis/service/customerService/invoiceApply";
 import { demandStatusOptions } from '@/assets/js/statusList'
 import { columns } from "./_columns"
 export default {
@@ -126,7 +126,8 @@ export default {
       const res = await asyncRequest.list({
         ...this.parmValue,
         ...this.pageInfo,
-        flow_stage: "结算阶段"
+        is_winv: "1",
+        status: "12"
       });
 
       if (res && res.code === 1 && res.data) {

+ 31 - 58
src/views/customerService/invoiceApply/detail.vue

@@ -8,11 +8,16 @@
               <create-invoice-apply />
             </el-collapse-item>
 
-            <!-- <template v-else> -->
-              <el-collapse-item title="发票申请管理" name="3">
+            <template v-else>
+              <el-collapse-item title="需求订单详情" name="3" />
+
+              <el-collapse-item title="开票申请详情" name="4" />
+
+              
+              <el-collapse-item title="发票申请管理" name="5">
                 <upload-invoice-node />
               </el-collapse-item>
-            <!-- </template> -->
+            </template>
           </el-collapse>
         </el-tab-pane>
       </el-tabs>
@@ -21,17 +26,18 @@
 </template>
 <script>
 import asyncRequest from "@/apis/service/customerService/invoiceApply";
+import demandRequest from "@/apis/service/customerService/demandOrder";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 
+import { demandDetailColumns } from '../demandOrder/columns';
 import CreateInvoiceApply from "./components/createInvoiceApply.vue"
 import { demandColumns, statusList,} from "./columns";
-import privateField from '@/mixins/privateField';
 
 
 export default {
   name: "invoiceApplyDetail",
-  mixins: [resToken, privateField],
+  mixins: [resToken],
   components:{ CreateInvoiceApply },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field", "isSupertube"]),
@@ -82,7 +88,11 @@ export default {
       this.queryType = type;
       this.projectTabs = "1";
       this.loading = true;
-      await this.initData();
+
+      if(id !== 'add'){
+        await this.initData();
+      }
+      
       this.loading = false;
     },
 
@@ -94,63 +104,26 @@ export default {
     },
     async initData() {
       this.loading = true;
-      this.loading = false;
+      const invoice = await asyncRequest.detail({
+        id: this.$route.query.id
+      })
+
+      if(invoice.code !== 1) {
+        this.loading = false
+        return
+      }
+
+      this.loading = false
+
+      const demand = await demandRequest.detail({
+        reqCode:invoice.reqCode
+      })
     },
+
     getNewTime() {
       this.newTime = new Date().valueOf();
     },
 
-    // 点击业务审核的保存按钮
-    async examFormSubmit(e, title) {
-      if (!this.loading) {
-        const { state, remark, adjunct, adjunct_name } = e;
-        let model = {
-          bargainNo: this.queryId,
-          status: state,
-          adjunct: adjunct,
-          adjunct_name: adjunct_name,
-          remark: remark,
-        };
-        await this.$confirm(`确定要提交${title}审批结果?`, {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        })
-          .then(async () => {
-            const { after_price, lower_price } = this.sitem;
-            if (after_price * 1 < lower_price * 1 && state + "" + "" === "1") {
-              this.loading = false;
-              await this.$confirm(
-                `当前商品同意议价后,售价已低于系统最低售价${this.sitem.lower_price}元!`,
-                `最终售价已低于系统最低售价!是否继续?`,
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "error",
-                }
-              )
-                .then(async () => {
-                  if (adjunct === "") {
-                    this.$message.warning("越线通过,附件为必填项!");
-                    return;
-                  }
-                  this.loading = true;
-                  await this.statusSubmit(model, title);
-                })
-                .catch(() => {
-                  this.loading = false;
-                  console.log("取消1");
-                });
-            } else {
-              await this.statusSubmit(model, title);
-            }
-          })
-          .catch(() => {
-            this.loading = false;
-            console.log("取消");
-          });
-      }
-    },
     async statusSubmit(model, title) {
       if (model.status === "0") model.status = "2";
       const { code, data, message } = await asyncRequest.status(model);

+ 43 - 66
src/views/customerService/invoiceApply/index.vue

@@ -56,16 +56,22 @@
               </el-col>
 
               <el-col :span="4">
-                <el-select
+                <!-- <el-select
                   style="width:100%"
                   :size="searchSize"
-                  v-model="parmValue.demandCompany"
+                  v-model="parmValue.customer_id"
                   clearable
                   placeholder="需求企业"
                   @change="pageInfo.curr = 1;parmValue.page = 1;searchList();"
                 >
                   <el-option />
-                </el-select>
+                </el-select> -->
+                <search-customer 
+                  size="mini" 
+                  placeholder="需求企业" 
+                  :value.sync="parmValue.customer_id"
+                  @change="pageInfo.curr = 1;parmValue.page = 1;searchList();"
+                />
               </el-col>
 
               <el-col :span="3" style="width: 66px; float: right">
@@ -97,7 +103,7 @@
                   clearable
                   :size="searchSize"
                   placeholder="开票申请编号"
-                  v-model="parmValue.openInviceNo"
+                  v-model="parmValue.invNo"
                   @change="
                     pageInfo.curr = 1;
                     parmValue.page = 1;
@@ -111,7 +117,7 @@
                   clearable
                   :size="searchSize"
                   placeholder="需求订单编号"
-                  v-model="parmValue.demandOrderNo"
+                  v-model="parmValue.reqCode"
                   @change="
                     pageInfo.curr = 1;
                     parmValue.page = 1;
@@ -166,25 +172,16 @@
             v-text="(statusList.find((item) => item.id == scope.row.status) || {}).label || '--'"
           ></el-tag>
        </template>
-       <template #good_name="{ scope }">
-          <span>{{ scope.row.good_name }}</span>
-          <span
-            v-for="(si, sii) in scope.row.specinfo"
-            :key="si.spec_value_id + sii"
-          >
-            {{ sii == 0 ? "__" : "--" }}{{ si.spec_name }}[{{
-              si.spec_value_name
-            }}]</span
-          >
-       </template>
-       <template #can="{ scope }">
-          <span v-for="(si, sii) in scope.row.can" :key="si.id + sii">
-            <span v-if="sii !== 0">_</span>{{ si.name }}</span
-          >
+
+       <template #invoice_type="{ scope: { row } }">
+        <el-tag size="mini">
+          {{  
+            (invoiceTypeList.find(({value}) => value === String(row.invoice_type)) || {}).label || '--'
+          }}
+        </el-tag>
        </template>
        <template #operation="{ scope }">
           <el-tooltip
-            v-if="powers.some((i) => i == '007')"
             effect="dark"
             content="详情"
             placement="top"
@@ -192,7 +189,7 @@
             <i
               class="el-icon-view tb-icon"
               
-               @click="getRouter('invoiceApplyDetail', scope.row.bargainNo )"
+               @click="getRouter('invoiceApplyDetail', scope.row.id )"
             ></i>
           </el-tooltip>
        </template>
@@ -203,19 +200,22 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/customerService/invoiceApply";
+import { invoiceTypeList } from '@/assets/js/statusList';
 import companyHelper from "@/mixins/companyHelper"
 import { listCol, statusList } from "./columns";
 import { mapGetters } from "vuex";
 
+
+
 /**
  *@props
  createStart//创建开始时间
  createEnd //创建结束时间
- demandCompany //需求企业
+ customer_id //需求企业
  invoiceNumber //发票号码
  invoiceType //发票类型
- openInviceNo //发票申请编号
- demandOrderNo //需求订单编号
+ invNo //发票申请编号
+ reqCode //需求订单编号
  status //申请状态
 */
 export default {
@@ -234,6 +234,7 @@ export default {
   },
   data() {
     return {
+      invoiceTypeList,
       customerCode: [], //客户公司code
       statusList,
       sitem: null,
@@ -244,11 +245,11 @@ export default {
       parmValue: {
         createStart:"",//创建开始时间
         createEnd:"", //创建结束时间
-        demandCompany:"", //需求企业
+        customer_id:"", //需求企业
         invoiceNumber:"", //发票号码
         invoiceType:"", //发票类型
-        openInviceNo:"", //发票申请编号
-        demandOrderNo:"", //需求订单编号
+        invNo:"", //发票申请编号
+        reqCode:"", //需求订单编号
         status:"", //申请状态
         page: 1, // 页码
         size: 15, // 每页显示条数
@@ -278,7 +279,7 @@ export default {
     if (back) {
       this.parmValue = JSON.parse(back);
       console.log(this.parmValue)
-      const {page,size}=this.parmValue;
+      const { page, size } = this.parmValue;
       // this.parmValue.createStart = start || last_start;
       // this.parmValue.createEnd = end || last_end;
 
@@ -286,7 +287,7 @@ export default {
       //     this.customerCode = [this.parmValue.customer_code] ;
       // }
       
-       this.pageInfo= {
+       this.pageInfo = {
         size: size,
         curr: page,
         total: 0,
@@ -308,27 +309,15 @@ export default {
       this.$router.push(`/customerService/invoiceApplyDetail?id=add`)
     },
     getRouter(toRouter, queryId){
-      if (toRouter && queryId) {
-        let model = {
-          id: queryId,
-          type: 'view',
-        };
+      this.$router.push(toRouter + '?id=' + queryId)
+        // let routerModel = {
+        //   options: JSON.parse(JSON.stringify(this.parmValue)),
+        //   router: this.$route.path,
+        // };
 
-        //有多选框的条件
-        this.parmValue.select = this.select ;
-        // this.parmValue.sselect = this.sselect ;
-        this.parmValue.s_input= this.s_input;
-        let routerModel = {
-          options: JSON.parse(JSON.stringify(this.parmValue)),
-          router: this.$route.path,
-        };
-
-        model.preModel = JSON.stringify(routerModel);
+        // model.preModel = JSON.stringify(routerModel);
         
-        this.routeGoto(toRouter, model);
-      } else {
-        this.$message.warning("暂未找到相关流程!");
-      }
+        // this.routeGoto(toRouter, model);
     },
     restSearch() {
       this.customerCode = [];
@@ -337,11 +326,11 @@ export default {
       this.parmValue = {
         createStart:"",//创建开始时间
         createEnd:"", //创建结束时间
-        demandCompany:"", //需求企业
+        customer_id:"", //需求企业
         invoiceNumber:"", //发票号码
         invoiceType:"", //发票类型
-        openInviceNo:"", //发票申请编号
-        demandOrderNo:"", //需求订单编号
+        invNo:"", //发票申请编号
+        reqCode:"", //需求订单编号
         status:"", //申请状态
         page: 1, // 页码
         size: 15, // 每页显示条数
@@ -390,7 +379,6 @@ export default {
     },
     // 列表搜索
     async searchList() {
-      return
       if (
         (this.parmValue.createStart !== "" && this.parmValue.createEnd === "") ||
         (this.parmValue.createStart === "" && this.parmValue.createEnd !== "")
@@ -400,23 +388,12 @@ export default {
       }
 
       this.loading = true;
-      this.parmValue.bargainNo = this.select === "1" ? this.s_input : "";
-      this.parmValue.bidsNo = this.select === "2" ? this.s_input : "";
-      this.parmValue.infoNo = this.select === "3" ? this.s_input : "";
-      this.parmValue.company_name = this.select === "4" ? this.s_input : "";
       
-      const res = await asyncRequest.list({
-        ...this.parmValue,
-        companyNo: this.currentCompany,
-        customer_code: Array.isArray(this.parmValue.customer_code) ? this.parmValue.customer_code[0] : "",
-        noRelation: true
-      });
+      const res = await asyncRequest.list(this.parmValue);
 
-      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;

+ 4 - 2
src/views/customerService/invoiceApply/开票申请管理

@@ -11,7 +11,7 @@
                   :width="'160px'"
                   :size="searchSize"
                   placeholder="创建"
-                  @timeReturned="(evt) => handleTime(evt,'create')"
+                  @timeReturned="(evt) => handleTime(evt, 'create')"
                 />
               </el-col>
 
@@ -520,6 +520,7 @@ export default {
         const m = String(minuteTime)
         result = "" + (m.length === 1 ? '0' + m : m) + ":" + result;
       }
+      
       if(hourTime > 0) {
         const h =  String(hourTime)
         result = "" + (h.length === 1 ? '0' + h : h) + ":" + result;
@@ -529,9 +530,10 @@ export default {
     // 刷新表格
     async searchList() {
       this.clearTimers()
+
       if (!this.loading) {
       for(const field of Object.keys(mapDateFields)){
-        const { start:startProp, end:endProp, label } = mapDateFields[field]
+        const { start: startProp, end: endProp, label } = mapDateFields[field]
 
         if (
           (this.parmValue[startProp] !== "" && this.parmValue[endProp] === "") ||

+ 4 - 8
src/views/customerService/workbench/letterEditing.vue

@@ -1,8 +1,6 @@
 <template>
   <div class="bargainList pagePadding">
-    <div
-      v-if=" powers.some((i) => i == '001')"
-    >
+    <div v-if=" powers.some((i) => i == '001')">
       <ex-table
         v-loading="loading"
         :table="table"
@@ -50,9 +48,9 @@
                 >
                   <el-option
                     v-for="item in statusList"
-                    :key="item.id"
                     :label="item.label"
                     :value="item.id"
+                    :key="item.id"
                   >
                   </el-option>
                 </el-select>
@@ -146,8 +144,7 @@
           >
             {{ sii == 0 ? "__" : "--" }}{{ si.spec_name }}[{{
               si.spec_value_name
-            }}]</span
-          >
+            }}]</span>
         </template>
         <template #can="{ scope }">
           <span v-for="(si, sii) in scope.row.can" :key="si.id + sii">
@@ -344,7 +341,6 @@ export default {
     },
     // 列表搜索
     async searchList() {
-      return
       if (
         (this.parmValue.createStart !== "" && this.parmValue.createEnd === "") ||
         (this.parmValue.createStart === "" && this.parmValue.createEnd !== "")
@@ -357,7 +353,6 @@ export default {
       
       const res = await asyncRequest.list({
         ...this.parmValue,
-        noRelation: true
       });
 
       if (res && res.code === 0 && res.data) {
@@ -374,6 +369,7 @@ export default {
 
     async statusConfirm(id, status) {
       let str = status + '' === "1" ? "禁用" : "启用";
+      
       await this.$confirm("确定要改为" + str + "?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",

+ 0 - 0
src/views/platformService/settlement/平台结算管理