Преглед на файлове

feat:客户业务管理模块

snow преди 1 година
родител
ревизия
ccfa69d6c6
променени са 63 файла, в които са добавени 4142 реда и са изтрити 3137 реда
  1. BIN
      src/.DS_Store
  2. 4 9
      src/App.vue
  3. 41 0
      src/apis/service/customerService/demandOrder/index.js
  4. 0 0
      src/apis/service/customerService/workbench/index.js
  5. 0 0
      src/apis/service/interest/account/index.js
  6. 34 8
      src/apis/service/platformService/settlement/index.js
  7. 7 0
      src/components/approval-node/index.js
  8. 3 0
      src/components/approval-node/readme.md
  9. 192 0
      src/components/approval-node/src/credentials.vue
  10. 77 0
      src/components/approval-node/src/normal.vue
  11. 89 0
      src/components/dynamic-tags/index.vue
  12. 6 0
      src/main.js
  13. 0 4
      src/router/index.js
  14. 16 1
      src/styles/index.scss
  15. 13 13
      src/utils/auth.js
  16. 6 0
      src/utils/static.js
  17. 0 29
      src/views/accept.vue
  18. 124 0
      src/views/customerService/demandOrder/_template.js
  19. 0 0
      src/views/customerService/demandOrder/_需求订单管理
  20. 184 0
      src/views/customerService/demandOrder/columns.js
  21. 72 0
      src/views/customerService/demandOrder/components/demandDetail/index.vue
  22. 76 0
      src/views/customerService/demandOrder/components/demandDetail/requsetPerpaymentModal.vue
  23. 226 0
      src/views/customerService/demandOrder/components/demandDetail/uploadCertificateModal.vue
  24. 20 0
      src/views/customerService/demandOrder/components/manageActivityScheme.vue
  25. 21 0
      src/views/customerService/demandOrder/components/manageBudgetLetter.vue
  26. 121 0
      src/views/customerService/demandOrder/components/waitCustomerConfirm.vue
  27. 85 0
      src/views/customerService/demandOrder/components/waitExecuteCertificate.vue
  28. 18 0
      src/views/customerService/demandOrder/components/waitSupplierConfirm.vue
  29. 118 0
      src/views/customerService/demandOrder/components/waitUploadSettlementLetter/_t.js
  30. 53 0
      src/views/customerService/demandOrder/components/waitUploadSettlementLetter/index.vue
  31. 187 0
      src/views/customerService/demandOrder/components/waitUploadSettlementLetter/xlsxUploadModal.vue
  32. 56 96
      src/views/customerService/demandOrder/detail.vue
  33. 141 69
      src/views/customerService/demandOrder/index.vue
  34. 197 0
      src/views/customerService/demandOrder/letterEditing.vue
  35. 0 353
      src/views/customerService/requiresOrder/columns.js
  36. 0 300
      src/views/customerService/requiresOrder/exam-form.vue
  37. 1 1
      src/views/customerService/workbench/components/baseForm.vue
  38. 1 1
      src/views/customerService/workbench/detail.vue
  39. 1 1
      src/views/customerService/workbench/index.vue
  40. 26 0
      src/views/platformService/invoice/_static.js
  41. 94 0
      src/views/platformService/invoice/columns.js
  42. 0 0
      src/views/platformService/invoice/components/invoice-modal.vue
  43. 5 27
      src/views/platformService/invoice/components/template.js
  44. 73 57
      src/views/platformService/invoice/index.vue
  45. 0 0
      src/views/platformService/invoice/发票审核管理
  46. 0 349
      src/views/platformService/invoiceReview/columns.js
  47. 0 409
      src/views/platformService/invoiceReview/detail.vue
  48. 0 300
      src/views/platformService/invoiceReview/exam-form.vue
  49. 59 0
      src/views/platformService/settlement/_static.js
  50. 98 277
      src/views/platformService/settlement/columns.js
  51. 170 0
      src/views/platformService/settlement/components/invoiceManagement/_t.js
  52. 64 0
      src/views/platformService/settlement/components/invoiceManagement/index.vue
  53. 115 0
      src/views/platformService/settlement/components/invoiceManagement/manuallyUploadModal.vue
  54. 189 0
      src/views/platformService/settlement/components/invoiceManagement/xlsxUploadModal.vue
  55. 67 0
      src/views/platformService/settlement/components/waitAuditCredentials.vue
  56. 187 0
      src/views/platformService/settlement/components/waitUploadCredentials.vue
  57. 88 0
      src/views/platformService/settlement/components/waitUploadRequirement.vue
  58. 34 130
      src/views/platformService/settlement/detail.vue
  59. 65 74
      src/views/platformService/settlement/index.vue
  60. 0 535
      src/views/serviceParam/supplier/components/addEdit.vue
  61. 8 94
      src/views/serviceParam/supplier/index.vue
  62. 13 0
      src/views/serviceParam/supplierStore/index.vue
  63. 597 0
      src/views/serviceParam/supplierStore/shopDecoration.vue

BIN
src/.DS_Store


+ 4 - 9
src/App.vue

@@ -42,23 +42,18 @@ export default {
       this.$store
         .dispatch('user/getMenuList', this)
         .then(async(res) => {
+            console.log(res)
           if (res === 'noToken') {
             await this.logout()
-          } else if (res === 'success' || res === 'success-dataV') {
+          } else{
             if (
               this.$route.path === '/' ||
               this.$route.path === '/login' ||
               this.$route.path === '/loadingPage'
             ) {
-              if (res === 'success-dataV') {
-                await window.vm.$router.replace('/bigScreen/datavScr')
-              } else {
-                await window.vm.$router.replace('/welcome')
-              }
+               await window.vm.$router.replace('/welcome')
             }
-          } else {
-            await this.logout()
-          }
+          } 
         })
         .catch((_err) => { this.logout() })
     },

+ 41 - 0
src/apis/service/customerService/demandOrder/index.js

@@ -0,0 +1,41 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 详情
+  detail: (data, params) => http(api + "bragaininfo", 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),
+  // 分页查询项目列表
+  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),
+  // 物流反馈
+  afterFeed: (data, params) => http(api + "afterfeed", data, "post", params),
+  // 企业客户反馈
+  aftergys: (data, params) => http(api + "aftergys", data, "post", params),
+  // 售后快递录入
+  afterPost: (data, params) => http(api + "afterpost ", data, "post", params),
+  //售后获取仓库list
+  afterwsm: (data, params) => http(api + "afterwsm ", data, "post", params),
+
+};

+ 0 - 0
src/apis/service/purchaseIn/workbench/index.js → src/apis/service/customerService/workbench/index.js


+ 0 - 0
src/views/customerService/requiresOrder/需求订单管理 → src/apis/service/interest/account/index.js


+ 34 - 8
src/apis/service/platformService/settlement/index.js

@@ -2,14 +2,40 @@
 import http from "@/apis/axios";
 const api = "admin/";
 export default {
-  // 添加
-  add: (data, params) => http(api + "unitcreate", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "bragaininfo", data, "post", params),
   // 更新
-  update: (data, params) => http(api + "unitedit", data, "post", params),
-  // 分页查询
-  list: (data, params) => http(api + "unitlist", data, "post", params),
-  // 删除
-  delete: (data, params) => http(api + "unitdelete", data, "post", params),
+  update: (data, params) => http(api + "zxedit", data, "post", params),
   // 修改状态
-  status: (data, params) => http(api + 'unitstatus', 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),
+  // 分页查询项目列表
+  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),
+  // 物流反馈
+  afterFeed: (data, params) => http(api + "afterfeed", data, "post", params),
+  // 企业客户反馈
+  aftergys: (data, params) => http(api + "aftergys", data, "post", params),
+  // 售后快递录入
+  afterPost: (data, params) => http(api + "afterpost ", data, "post", params),
+  //售后获取仓库list
+  afterwsm: (data, params) => http(api + "afterwsm ", data, "post", params),
+
 };

+ 7 - 0
src/components/approval-node/index.js

@@ -0,0 +1,7 @@
+import CredentialsNode from "./src/credentials.vue"
+import NormalNode from "./src/normal.vue"
+
+export {
+  CredentialsNode,
+  NormalNode
+}

+ 3 - 0
src/components/approval-node/readme.md

@@ -0,0 +1,3 @@
+# 审批节点
+## normal-node -> 普通的审核节点(状态、备注)
+## credentials-node -> 凭证节点(凭证图片列表)

+ 192 - 0
src/components/approval-node/src/credentials.vue

@@ -0,0 +1,192 @@
+<template>
+    <el-form label-position="left" :model="ruleForm" :rules="rules" ref="ruleForm" size="mini">
+      <el-form-item label="凭证图片" :prop="prop" style="display:flex;">
+        <div class="good_info_img_div" style="margin-left:15px">
+          <ul v-if="ruleForm[prop]" class="clear">
+            <li
+              class="img-show-li"
+              v-viewer
+              v-for="(img, iindex) in ruleForm[prop]"
+              :key="img + iindex"
+            >
+              <div class="img-show-li-div">
+                <img :src="img" class="img-show" alt="" />
+                <i
+                  class="el-icon-close"
+                  @click="closeImg(iindex, prop)"
+                ></i>
+              </div>
+            </li>
+            <li
+              class="img-show-li"
+              v-if="ruleForm[prop].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, prop)"
+                    @UploadSuccessEvent="
+                      UploadSuccessEvent($event, prop)
+                    "
+                  ></file-upload>
+                </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>
+</template>
+
+<script>
+export default {
+  name:'CredentialsNode',
+  props:{
+    prop:{
+      type:String,
+      default:() => 'credentials'
+    }
+  },
+  data(){
+    return {
+      ruleForm:{
+        [this.prop]:[]
+      },
+      rules:{
+        [this.prop]:[
+          {
+            required:true,
+            trigger:'change',
+            message:'请上传凭证图片'
+          }
+        ]
+      }
+    }
+  },
+  methods:{
+     beforeAvatarUpload(file) {
+        let isJPG = false;
+        if (
+          file.type === "image/jpg" ||
+          file.type === "image/png" ||
+          file.type === "image/jpeg"
+          ) {
+            isJPG = true;
+          }
+          const isLt2M = file.size / 1024 / 1024 < 1;
+          if (!isJPG) {
+            this.$message.error("图片格式不正确!");
+          }
+          if (!isLt2M) {
+          this.$message.error("图片大小不能超过 1MB!");
+         }
+          return isJPG && isLt2M;
+        },
+        closeImg(index, key) {
+            this.ruleForm[key].splice(index, 1);
+            this.$refs.ruleForm.validateField(key);
+        },
+        async UploadSuccessEvent(data, key) {
+          const { url } = data;
+          if (url === "noToken") {
+            await this.logout();
+          } else {
+            if (key === "good_thumb_img") {
+              this.ruleForm[key] = url;
+            } else {
+              if (this.ruleForm[key].length < 10) {
+                this.ruleForm[key].push(url);
+              }
+            }
+            this.$refs.ruleForm.validateField(key);
+            this.$message.success("图片上传成功!");
+          }
+        },
+        UploadErrorEvent(res, key) {
+            if (res !== "break") {
+                this.$message.error("图片上传失败!");
+                this.$refs.ruleForm.validateField(key);
+            }
+        },
+        UploadErrorEvent(res, key) {
+            if (res !== "break") {
+                this.$message.error("图片上传失败!");
+                this.$refs.ruleForm.validateField(key);
+            }
+        },
+        async onSubmit(){
+          try {
+            await this.$refs.ruleForm.validate()
+            this.$emit('confirm',this.ruleForm)
+          }catch(err){
+            console.log(err)
+          }
+      }
+    }
+}
+</script>
+
+
+<style lang="scss" scoped>
+  // position: relative;
+  .good_info_img_div {
+    ul {
+      width: 100%;
+      li {
+        float: left;
+        width: 55px;
+        height: 55px;
+        padding: 0 5px 0 0;
+        .img-show-li-div {
+          width: 50px;
+          height: 50px;
+          border: 1px solid #dfe4ed;
+          background: #dfe4ed;
+          position: relative;
+          img.img-show {
+            width: 100%;
+            height: 100%;
+            position: relative;
+            display: inline-block;
+          }
+          i.el-icon-close {
+            position: absolute;
+            z-index: 2;
+            top: 0;
+            right: 0;
+            color: #dfe4ed;
+          }
+          &:hover {
+            i.el-icon-close {
+              cursor: pointer;
+              color: #6954f0;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .goodsCostAdd-title {
+    border-top: 1px solid #ebeef5;
+    span {
+      height: 50px;
+      line-height: 50px;
+      font-family: "微软雅黑", sans-serif;
+      font-weight: 400;
+      font-style: normal;
+      font-size: 16fpx;
+      text-align: left;
+    }
+  }
+</style>

+ 77 - 0
src/components/approval-node/src/normal.vue

@@ -0,0 +1,77 @@
+<template>
+  <el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-position="left" size="mini" label-width="80px">
+    <el-form-item label="审核状态" :prop="'status'">
+      <el-select style="width:400px" v-model="ruleForm['status']">
+        <el-option v-for="status in statusList" :key="status.value" :value="status.value" :label="status.label" />
+      </el-select>
+    </el-form-item>
+
+    <el-form-item label="审核备注" :prop="'remark'">
+      <el-input style="width:400px" type="textarea" v-model="ruleForm['remark']" />
+    </el-form-item>
+
+    <el-form-item style="display:flex;justify-content:flex-end;width:470px">
+       <el-button type="primary" size="mini" @click="onSubmit">保存</el-button>
+    </el-form-item>
+  </el-form>
+</template>
+
+<script>
+export default {
+  name:'NormalNode',
+  props:{
+    passValue:{
+      type:String,
+      default:() => "1"
+    },
+    rejectValue:{
+      type:String,
+      default:() => '0'
+    }
+  },
+  data(){
+      return {
+          ruleForm:{
+            ['status']:"",
+            ['remark']:""
+          }
+      }
+  },
+  computed:{
+    statusList(){
+      return [
+       {label:'通过',value:this.passValue},
+       {label:'驳回',value:this.rejectValue}
+      ]
+    },
+    rules(){
+      return ({
+        ['status']:[
+          {
+            required:true,
+            trigger:'change',
+            message:'请选择审核状态'
+          }
+        ],
+        ['remark']:[
+          {
+            required:this.ruleForm['status'] === this.rejectValue,
+            trigger:'change',
+            message:'请输入备注'
+          }
+        ]
+      })
+    }
+  },
+  methods:{
+    async onSubmit(){
+      try {
+        await this.$refs.ruleForm.validate()
+        this.$emit('confirm',this.ruleForm)
+      }catch(err){
+        console.log(err)
+      }
+    }
+  }
+}
+</script>

+ 89 - 0
src/components/dynamic-tags/index.vue

@@ -0,0 +1,89 @@
+<template>
+<div>
+       <el-tag
+          :key="tag"
+           v-for="tag in dynamicTags"
+           closable
+           :disable-transitions="false"
+           @close="handleClose(tag)">
+           {{tag}}
+        </el-tag>
+        <el-input
+          class="input-new-tag"
+          v-if="inputVisible"
+          v-model="inputValue"
+          ref="saveTagInput"
+          size="small"
+          @keyup.enter.native="handleInputConfirm"
+          @blur="handleInputConfirm"
+        />
+    <el-button v-else class="button-new-tag" size="small" @click="showInput">+ 新设施</el-button>   
+</div>
+</template>
+
+<script>
+export default {
+    name:'DynamicTags',
+    props:{
+        tags:{
+            type:'Array',
+            default:() => ([])
+        }
+    },
+    data(){
+        return {
+            dynamicTags: [],
+            inputVisible: false,
+            inputValue: ''
+        }
+    },
+    computed:{
+        innerTags:{
+            get(){
+                return this.tags
+            },
+            set(newVal){
+                this.$emit('update:tags',newVal)
+            }
+        }
+    },
+    methods:{
+        handleClose(tag) {
+            this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
+        },
+        showInput() {
+            this.inputVisible = true;
+            this.$nextTick(_ => {
+                this.$refs.saveTagInput.$refs.input.focus();
+            });
+        },
+        handleInputConfirm() {
+            let inputValue = this.inputValue;
+            if (inputValue) {
+                this.dynamicTags.push(inputValue);
+            }
+            this.inputVisible = false;
+            this.inputValue = '';
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+  .el-tag + .el-tag {
+    margin-left: 10px;
+  }
+  .button-new-tag {
+    margin-left: 10px;
+    height: 32px;
+    line-height: 30px;
+    padding-top: 0;
+    padding-bottom: 0;
+  }
+  .input-new-tag {
+    width: 90px;
+    margin-left: 10px;
+    vertical-align: bottom;
+  }
+  
+</style>

+ 6 - 0
src/main.js

@@ -30,6 +30,12 @@ import 'vue-awesome/icons/chart-line.js'
 import 'vue-awesome/icons/align-left.js'
 import echarts from 'echarts'
 import * as filters from './filters' // global filters
+
+
+import { CredentialsNode, NormalNode} from "@/components/approval-node"
+
+Vue.component('credentials-node',CredentialsNode)
+Vue.component('normal-node',NormalNode)
 Vue.component('icon', Icon)
 Vue.use(dataV)
 Vue.component('flow-chart', FlowChart)

+ 0 - 4
src/router/index.js

@@ -5,10 +5,6 @@ const routes = [
     path: '/',
     redirect: '/loadingPage'
   },
-  {
-    path: '/accept',
-    component: () => import('@/views/accept.vue')
-  },
   // 登录页
   {
     path: '/login',

+ 16 - 1
src/styles/index.scss

@@ -848,4 +848,19 @@ aside {
 // .el-menu-item{
 //   height: 40px!important;
 //   line-height: 40px!important;
-// }
+// }
+
+.flex-between{
+  display: flex;
+  justify-content: space-between;
+}
+
+.flex-end{
+  display: flex;
+  justify-content: flex-end;
+}
+
+.align-center{
+  display: flex;
+  align-items: center;
+}

+ 13 - 13
src/utils/auth.js

@@ -1,21 +1,21 @@
 import Cookies from 'js-cookie'
 
-const MenuKey = 'Purchase-Console-Menu'
-const BtnKey = 'Purchase-Console-MenuBtn'
-const NoticeKey = 'Purchase-Console-Notice'
-const mainMenuKey = 'Purchase-Console-MainMenu'
-const businessCompanyKey = 'Purchase-Console-businessCompany'
-const businessCompanyNoKey = 'Purchase-Console-businessCompanyNo'
-const privateFieldKey = 'Purchase-Console-privateField'
-const actionDataKey = 'Purchase-Console-actionData'
-const roleLevelKey = 'Purchase-Console-roleLevel'
-const companyKey = 'Purchase-Console-company'
+const MenuKey = 'Conference-Console-Menu'
+const BtnKey = 'Conference-Console-MenuBtn'
+const NoticeKey = 'Conference-Console-Notice'
+const mainMenuKey = 'Conference-Console-MainMenu'
+const businessCompanyKey = 'Conference-Console-businessCompany'
+const businessCompanyNoKey = 'Conference-Console-businessCompanyNo'
+const privateFieldKey = 'Conference-Console-privateField'
+const actionDataKey = 'Conference-Console-actionData'
+const roleLevelKey = 'Conference-Console-roleLevel'
+const companyKey = 'Conference-Console-company'
 const userLevelkey = 'puchase-Console-level'
-const userKey = 'Purchase-Console-user'
+const userKey = 'Conference-Console-user'
 
-export const TokenKey = 'Purchase-Console-Token'
+export const TokenKey = 'Conference-Console-Token'
 // 业务公司business 供应商supplier
-const companyTypeKey = 'Purchase-Console-companyType'
+const companyTypeKey = 'Conference-Console-companyType'
 
 export function setUserLevel(type) {
   return localStorage.setItem(userLevelkey, type)

+ 6 - 0
src/utils/static.js

@@ -0,0 +1,6 @@
+export const createEmptyStringObject = function(mapObject){
+  return Object.keys(mapObject).reduce((prev,currentKey) => ({
+    ...prev,
+    [mapObject[currentKey]]:''
+  }),{})
+}

+ 0 - 29
src/views/accept.vue

@@ -1,29 +0,0 @@
-<template>
-  <div
-    v-loading="true"
-    style="width: 100vw;height: 100vh"
-    element-loading-text="登录中..."
-  />
-</template>
-
-<script>
-import CryptoJS from 'crypto-js'
-import config from '@/config/index'
-
-export default {
-  name: 'Accept',
-  async mounted() {
-    try {
-      // 解密token
-      const decData = CryptoJS.enc.Base64.parse(this.$route.query.t).toString(CryptoJS.enc.Utf8)
-      const decJson = CryptoJS.AES.decrypt(decData, config.secretKey).toString(CryptoJS.enc.Utf8)
-      const { token } = JSON.parse(decJson)
-      // 根据 token 获取用户信息...
-      await this.$store.dispatch('user/loginByToken', token)
-      await this.$router.push('/welcome/dashboard')
-    } catch (e) {
-      await this.$router.push('/login')
-    }
-  }
-}
-</script>

+ 124 - 0
src/views/customerService/demandOrder/_template.js

@@ -0,0 +1,124 @@
+const mapFields = {
+  primaryClassification:'primaryClassification', // 一级分类
+  secondaryClassification:'secondaryClassification',  // 二级分类
+  threeLevelClassification:'threeLevelClassification', // 三级分类
+  price:'price', // 单价
+  unit:'unit', // 单位
+  nonTaxQuotes:'nonTaxQuotes', // 非税报价
+  taxRate:'taxRate', // 税率
+  taxIncludedQuote:'taxIncludedQuote', //含税报价
+  remark:'remark' //备注
+}
+
+const mapTemplateToTable = {
+  '一级分类': mapFields.primaryClassification,
+  '二级分类': mapFields.secondaryClassification,
+  '三级分类': mapFields.threeLevelClassification,
+  '单价': mapFields.price,
+  '单位': mapFields.unit,
+  '非税报价': mapFields.nonTaxQuotes,
+  '税率': mapFields.taxRate,
+  '含税报价': mapFields.taxIncludedQuote,
+  '备注':mapFields.remark
+}
+
+export const columns = [
+  {
+      type: 'index',
+      label: '序号',
+      width: '70px'
+  },
+  {
+      prop: mapFields.primaryClassification,
+      label: '一级分类',
+      width: '110px',
+      required: true
+  },
+  {
+      prop: mapFields.secondaryClassification,
+      label: '二级分类',
+      width: '120px',
+      required: true
+  },
+  {
+      prop: mapFields.threeLevelClassification,
+      label: '三级分类',
+      width: '156px',
+      required: true
+  },
+  {
+      prop: mapFields.price,
+      label: '单价',
+      width: '180px',
+      required: true
+  },
+  {
+      prop: mapFields.nonTaxQuotes,
+      label: '非税报价',
+      width: '156px',
+      required: true
+  },
+  {
+      prop: mapFields.taxRate,
+      label: '税率',
+      width: '156px',
+      required: false
+  },
+  {
+      prop: mapFields.taxIncludedQuote,
+      label: '含税报价',
+      width: '150px',
+      required: false
+  },
+  {
+      prop: mapFields.remark,
+      label: '备注',
+      minWidth: '150px',
+      required: false
+  },
+  {
+    prop: "",
+    label: '操作',
+    minWidth: '80px',
+    required: false
+},
+]
+
+export function createErrorMessage(messages) {
+  const rows = Object.keys(messages)
+  return rows.reduce((prev, row, index) => {
+      const suffix = index === rows.length - 1 ? '</ul>' : ''
+      const content = prev + ` <li><strong style="font-weight:700">第${row}行</strong>,${messages[row]} </li> `
+      return content + suffix
+  }, '<ul>')
+}
+
+export const createFieldVerification = (message) => ({
+  notValidRows: [],
+  isValid: true,
+  message
+})
+
+export const template = Array(1).fill(1).map(() => Object.keys(mapTemplateToTable).reduce((prev, property) => {
+  prev[property] = ''
+  return prev
+}, {}))
+
+
+export const requiredFields = []
+
+
+export const helper = {
+  fields(sourceObject) {return Object.keys(sourceObject)},
+  values(sourceObject, fields, index = 0) {
+      return fields.map(field => {
+          return sourceObject[field][index]
+      })
+  },
+  write(sourceObject, fields) {
+      return fields.reduce((prev, currentKey) => ({
+          ...prev,
+          [currentKey]: sourceObject[currentKey]
+      }), {})
+  }
+}

+ 0 - 0
src/views/platformService/invoiceReview/发票审核管理 → src/views/customerService/demandOrder/_需求订单管理


+ 184 - 0
src/views/customerService/demandOrder/columns.js

@@ -0,0 +1,184 @@
+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' }
+  // 已选完商品,取消议价
+]
+const listCol = [
+  {
+    prop: '需求订单编号prop',
+    label: '需求订单编号',
+    width: '155'
+  },
+
+  {
+    prop: '活动城市prop',
+    label: '活动城市',
+    width: '155'
+  },
+
+  {
+    prop: '需求项目prop',
+    label: '需求项目',
+    width: '120px'
+  },
+  {
+    prop: '活动人数prop',
+    label: '活动人数',
+    width: '155'
+  },
+
+  {
+    prop: '活动需求prop',
+    label: '活动需求',
+    width: '155px'
+  },
+  {
+    prop: '活动时间prop',
+    label: '活动时间',
+    width: '155px'
+  },
+  {
+    prop: '活动总天数prop',
+    label: '活动总天数',
+    'min-width': '180'
+  },
+  {
+    prop: '咨询截止时间prop',
+    label: '咨询截止时间',
+    'min-width': '125'
+  },
+  {
+    prop: '状态prop',
+    label: '状态',
+    minWidth: '150px'
+  },
+  {
+    prop: '需求公司prop',
+    label: '需求公司',
+    'width': '120'
+  },
+  {
+    prop: '联系电话prop',
+    label: '联系电话',
+    'width': '120'
+  },
+  {
+    prop: '创建人prop',
+    label: '创建人',
+    'width': '120'
+  },
+  {
+    prop: '创建时间prop',
+    label: '创建时间',
+    'width': '120'
+  },
+
+  {
+    prop: '',
+    label: '操作',
+    fixed: 'right',
+    _noset_: true,
+    _slot_: 'operation',
+    width: 80
+  }
+]
+
+const demandDetailColumns = [
+  {
+    prop:'todo',
+    label:'活动城市',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'创建人',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'创建时间',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'活动城市',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'活动需求',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'活动时间',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'活动人数',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'需求项目',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'招标截止时间',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'需求公司',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'当前阶段',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'活动执行供应商',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'需求预算',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'预付类型',
+    span:8,
+    _slot_:'prepaymentType'
+  },
+  {
+    prop:'todo',
+    label:'预付金额',
+    span:8,
+    _slot_:'prepaymentAmount'
+  },
+  {
+    prop:'todo',
+    label:'活动结算金额',
+    span:8
+  },
+  {
+    prop:'todo',
+    label:'当前状态',
+    span:16,
+    _slot_:'currentStatus'
+  }
+]
+
+export {
+  listCol, 
+  statusList,
+  demandDetailColumns
+}

+ 72 - 0
src/views/customerService/demandOrder/components/demandDetail/index.vue

@@ -0,0 +1,72 @@
+<template>
+  <div>
+    <show-data-table
+      style="padding: -5px 0 10px 0"
+      v-if="newTime !== ''"
+      :newTime="newTime"
+      :sitem="data"
+      :columns="demandDetailColumns" 
+    >
+      <template #prepaymentType>
+        <div class="flex-between align-center" style="height:18px;padding-top:5px">
+          <p style="margin-left:5px">未设置</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>
+          <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>
+        </div>
+      </template>
+    </show-data-table>
+
+    <request-perpayment-modal :visible.sync="requsetModalVisible" />
+    <upload-cerfificate-modal :visible.sync="uploadModalVisible" />
+  </div>
+</template>
+
+<script>
+import { demandDetailColumns } from "./../../columns"
+import RequestPerpaymentModal from "./requsetPerpaymentModal.vue"
+import UploadCerfificateModal from "./uploadCertificateModal.vue"
+export default {
+  name:'demandDetail',
+  components:{
+    RequestPerpaymentModal,
+    UploadCerfificateModal
+  },
+  props:{
+    data:{
+      type:Object,
+      default:() => ({})
+    }
+  },
+  watch:{
+    data:{
+      handler(){
+        this.newTime = new Date().valueOf()
+      },
+      deep:true,
+      immediate:true
+    }
+  },
+  data(){
+    return {
+      requsetModalVisible:false, //申请预付模态框
+      uploadModalVisible:false, // 上传预付凭证模态框
+      demandDetailColumns,
+      newTime:""
+    }
+  }
+}
+</script>

+ 76 - 0
src/views/customerService/demandOrder/components/demandDetail/requsetPerpaymentModal.vue

@@ -0,0 +1,76 @@
+<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">
+      <el-form-item label="预付类型" :prop="mapFields.prepaymentType">
+        <el-select style="width:250px" placeholder="预付类型" v-model="ruleForm[mapFields.prepaymentType]">
+          <el-option />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="支付比例" :prop="mapFields.paymentRatio">
+        <el-select style="width:250px" v-model="ruleForm[mapFields.paymentRatio]" placeholder="支付比例">
+          <el-option />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item class="flex-end">
+        <el-button type="primary" @click="onSubmit">保存</el-button>
+      </el-form-item>
+    </el-form>
+  </el-dialog>
+</template>
+
+<script>
+import { createEmptyStringObject } from '@/utils/static'
+
+const mapFields = {
+  prepaymentType:'prepaymentType', //预付类型
+  paymentRatio:"paymentRatio" //支付比例
+}
+
+export default {
+  props:['visible'],
+  computed:{
+    innerVisible:{
+      get(){
+        return this.visible
+      },
+      set(newVal){
+        this.$emit('update:visible',newVal)
+      }
+    }
+  },
+  data(){
+    return {
+      mapFields,
+      ruleForm:createEmptyStringObject(mapFields),
+      rules:{
+        [mapFields.prepaymentType]:[{
+          required:true,
+          trigger:'change',
+          message:'请选择预付类型'
+        }],
+        [mapFields.paymentRatio]:[{
+          required:true,
+          trigger:'change',
+          message:'请选择支付比例'
+        }],
+      }
+    }
+  },
+  methods:{
+    onClose(){
+      this.ruleForm = createEmptyStringObject(mapFields)
+      this.innerVisible = false
+    },
+    async onSubmit(){
+      try {
+        await this.$refs.ruleForm.validate()
+        console.log('todo...')
+      }catch(err){
+        console.log(err)
+      }
+    }
+  }
+}
+</script>

+ 226 - 0
src/views/customerService/demandOrder/components/demandDetail/uploadCertificateModal.vue

@@ -0,0 +1,226 @@
+<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">
+      <el-form-item label="预付总金额" :prop="mapFields.prepaymentAmount" style="display:flex">
+        <el-input style="width:350px" placeholder="预付总金额" v-model="ruleForm[mapFields.prepaymentAmount]" />
+      </el-form-item>
+
+      <el-form-item label="凭证图片" :prop="mapFields.certificateImage" style="display:flex;">
+        <div class="good_info_img_div" style="margin-left:15px">
+          <ul v-if="ruleForm[mapFields.certificateImage]" class="clear">
+            <li
+              class="img-show-li"
+              v-viewer
+              v-for="(img, iindex) in ruleForm[mapFields.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, mapFields.certificateImage)"
+                ></i>
+              </div>
+            </li>
+            <li
+              class="img-show-li"
+              v-if="ruleForm[mapFields.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, mapFields.certificateImage)"
+                    @UploadSuccessEvent="
+                      UploadSuccessEvent($event, mapFields.certificateImage)
+                    "
+                  ></file-upload>
+                </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>
+  </el-dialog>
+</template>
+
+<script>
+const mapFields = {
+  //预付总金额
+  prepaymentAmount:'prepaymentAmount',
+  //付款凭证图
+  certificateImage:'certificateImage'
+}
+
+export default {
+  props:['visible'],
+  computed:{
+    innerVisible:{
+      get(){
+        return this.visible
+      },
+      set(newVal){
+        this.$emit('update:visible',newVal)
+      }
+    }
+  },
+  data(){
+    return {
+      mapFields,
+      ruleForm:{
+        [mapFields.prepaymentAmount]:"",
+        [mapFields.certificateImage]:[]
+      },
+      rules:{
+         [mapFields.prepaymentAmount]:[
+          {
+            required:true,
+            trigger:'change',
+            message:'请输入预付总金额'
+          }
+         ],
+        [mapFields.certificateImage]:[
+          {
+            required:true,
+            trigger:'change',
+            message:'请上传凭证图片'
+          }
+        ]
+      }
+    }
+  },
+  methods:{
+     handleClose(){
+      this.ruleForm = {
+        [mapFields.prepaymentAmount]:"",
+        [mapFields.certificateImage]:[]
+      }
+
+       this.innerVisible = false
+     },
+     beforeAvatarUpload(file) {
+        let isJPG = false;
+        if (
+          file.type === "image/jpg" ||
+          file.type === "image/png" ||
+          file.type === "image/jpeg"
+          ) {
+            isJPG = true;
+          }
+          const isLt2M = file.size / 1024 / 1024 < 1;
+          if (!isJPG) {
+            this.$message.error("图片格式不正确!");
+          }
+          if (!isLt2M) {
+          this.$message.error("图片大小不能超过 1MB!");
+         }
+          return isJPG && isLt2M;
+        },
+        closeImg(index, key) {
+            this.ruleForm[key].splice(index, 1);
+            this.$refs.ruleForm.validateField(key);
+        },
+        async UploadSuccessEvent(data, key) {
+          const { url } = data;
+          if (url === "noToken") {
+            await this.logout();
+          } else {
+            if (key === "good_thumb_img") {
+              this.ruleForm[key] = url;
+            } else {
+              if (this.ruleForm[key].length < 10) {
+                this.ruleForm[key].push(url);
+              }
+            }
+            this.$refs.ruleForm.validateField(key);
+            this.$message.success("图片上传成功!");
+          }
+        },
+        UploadErrorEvent(res, key) {
+            if (res !== "break") {
+                this.$message.error("图片上传失败!");
+                this.$refs.ruleForm.validateField(key);
+            }
+        },
+        UploadErrorEvent(res, key) {
+            if (res !== "break") {
+                this.$message.error("图片上传失败!");
+                this.$refs.ruleForm.validateField(key);
+            }
+        },
+        async onSubmit(){
+          try {
+            await this.$refs.ruleForm.validate()
+            console.log('todo...')
+          }catch(err){
+            console.log(err)
+          }
+      }
+    }
+}
+</script>
+
+
+<style lang="scss" scoped>
+  // position: relative;
+  .good_info_img_div {
+    ul {
+      width: 100%;
+      li {
+        float: left;
+        width: 55px;
+        height: 55px;
+        padding: 0 5px 0 0;
+        .img-show-li-div {
+          width: 50px;
+          height: 50px;
+          border: 1px solid #dfe4ed;
+          background: #dfe4ed;
+          position: relative;
+          img.img-show {
+            width: 100%;
+            height: 100%;
+            position: relative;
+            display: inline-block;
+          }
+          i.el-icon-close {
+            position: absolute;
+            z-index: 2;
+            top: 0;
+            right: 0;
+            color: #dfe4ed;
+          }
+          &:hover {
+            i.el-icon-close {
+              cursor: pointer;
+              color: #6954f0;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .goodsCostAdd-title {
+    border-top: 1px solid #ebeef5;
+    span {
+      height: 50px;
+      line-height: 50px;
+      font-family: "微软雅黑", sans-serif;
+      font-weight: 400;
+      font-style: normal;
+      font-size: 16fpx;
+      text-align: left;
+    }
+  }
+</style>

+ 20 - 0
src/views/customerService/demandOrder/components/manageActivityScheme.vue

@@ -0,0 +1,20 @@
+<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>
+</template>
+
+<script>
+export default {
+  data(){
+    return {}
+  }
+}
+</script>

+ 21 - 0
src/views/customerService/demandOrder/components/manageBudgetLetter.vue

@@ -0,0 +1,21 @@
+<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>
+</template>
+
+<script>
+export default {
+  data(){
+    return {}
+  }
+}
+</script>

+ 121 - 0
src/views/customerService/demandOrder/components/waitCustomerConfirm.vue

@@ -0,0 +1,121 @@
+<template>
+    <el-form label-position="left" :model="ruleForm" :rules="rules" size="mini" ref="ruleForm" label-width="80px">
+      <el-form-item label="活动评价" :prop="mapFields.activityScore">
+        <el-rate v-model="ruleForm[mapFields.activityScore]" />
+      </el-form-item>
+
+      <el-form-item label="评价内容" :prop="mapFields.content">
+        <el-input v-model="ruleForm[mapFields.content]" placeholder="请输入内容" style="width:500px" type="textarea" />
+      </el-form-item>
+
+      <el-form-item class="flex-end activity-upload my-label-top" style="width:570px">
+        <el-button type="primary" @click="onSubmit">确认提交</el-button>
+      </el-form-item>
+    </el-form>
+</template>
+
+<script>
+//TODO:图片和视频上传
+const mapFields = {
+  activityScore:'activityScore', //活动评价
+  content:'content', //客户公司
+  image:'image',
+  video:'video'
+}
+
+export default {
+  data(){
+    return {
+      mapFields,
+      ruleForm:{
+        [mapFields.content]:"",
+        [mapFields.activityScore]:"",
+      }
+    }
+  },
+  computed:{
+    rules(){
+      return {
+      [mapFields.content]:[
+        {
+          required:true,
+          trigger:'change',
+          message:'请输入评价内容'
+        }
+      ],
+      [mapFields.activityScore]:[
+        {
+          required:true,
+          trigger:'change',
+          message:'请选择活动评价'
+        }
+      ]
+     }
+    }
+  },
+  methods:{
+        async onSubmit(){
+          try {
+            await this.$refs.ruleForm.validate()
+            this.$emit('pass',this.ruleForm)
+          }catch(err){
+            console.log(err)
+          }
+      }
+    }
+}
+</script>
+
+
+<style lang="scss" scoped>
+  .good_info_img_div {
+    ul {
+      width: 100%;
+      li {
+        float: left;
+        width: 55px;
+        height: 55px;
+        padding: 0 5px 0 0;
+        .img-show-li-div {
+          width: 50px;
+          height: 50px;
+          border: 1px solid #dfe4ed;
+          background: #dfe4ed;
+          position: relative;
+          img.img-show {
+            width: 100%;
+            height: 100%;
+            position: relative;
+            display: inline-block;
+          }
+          i.el-icon-close {
+            position: absolute;
+            z-index: 2;
+            top: 0;
+            right: 0;
+            color: #dfe4ed;
+          }
+          &:hover {
+            i.el-icon-close {
+              cursor: pointer;
+              color: #6954f0;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .goodsCostAdd-title {
+    border-top: 1px solid #ebeef5;
+    span {
+      height: 50px;
+      line-height: 50px;
+      font-family: "微软雅黑", sans-serif;
+      font-weight: 400;
+      font-style: normal;
+      font-size: 16fpx;
+      text-align: left;
+    }
+  }
+</style>

+ 85 - 0
src/views/customerService/demandOrder/components/waitExecuteCertificate.vue

@@ -0,0 +1,85 @@
+<template>
+    <el-form label-position="left" :model="ruleForm" :rules="rules" ref="ruleForm" size="mini" label-width="80px">
+      <el-form-item label="审核状态" :prop="mapFields.status">
+        <el-select v-model="ruleForm[mapFields.status]" placeholder="审核状态" style="width:500px">
+          <el-option v-for="status in statusList" :key="status.value" :value="status.value" :label="status.label" />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="客户公司" :prop="mapFields.customer">
+        <el-select v-model="ruleForm[mapFields.customer]" placeholder="客户公司" style="width:500px">
+          <el-option />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="审核备注" :prop="mapFields.remark">
+        <el-input v-model="ruleForm[mapFields.remark]" type="textarea" placeholder="审核备注" style="width:500px" />
+      </el-form-item>
+
+      <el-form-item class="flex-end" style="width:570px">
+        <el-button type="primary" @click="onSubmit">保存</el-button>
+      </el-form-item>
+    </el-form>
+</template>
+
+<script>
+const mapFields = {
+  status:'status', //审核状态
+  customer:'customer', //客户公司
+  remark:'remark' //审核备注
+}
+
+export default {
+  data(){
+    return {
+      mapFields,
+      statusList:[
+        {value:'1', label:'通过'},
+        {value:'0', label:'驳回'}
+      ],
+      ruleForm:{
+        [mapFields.customer]:"",
+        [mapFields.status]:"",
+        [mapFields.remark]:""
+      }
+    }
+  },
+  computed:{
+    rules(){
+      return {
+      [mapFields.customer]:[
+        {
+          required:true,
+          trigger:'change',
+          message:'请选择客户公司'
+        }
+      ],
+      [mapFields.status]:[
+        {
+          required:true,
+          trigger:'change',
+          message:'请选择审核状态'
+        }
+      ],
+      [mapFields.remark]:[
+        {
+          required:this.ruleForm[mapFields.status] === '0',
+          trigger:'change',
+          message:'请输入审核备注'
+        }
+      ],
+     }
+    }
+  },
+  methods:{
+        async onSubmit(){
+          try {
+            await this.$refs.ruleForm.validate()
+            this.$emit('pass',this.ruleForm)
+          }catch(err){
+            console.log(err)
+          }
+      }
+    }
+}
+</script>

+ 18 - 0
src/views/customerService/demandOrder/components/waitSupplierConfirm.vue

@@ -0,0 +1,18 @@
+<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>
+</template>
+
+<script>
+export default {
+  data(){
+    return {}
+  }
+}
+</script>

+ 118 - 0
src/views/customerService/demandOrder/components/waitUploadSettlementLetter/_t.js

@@ -0,0 +1,118 @@
+const mapFields = {
+    letterNo:'letterNo', //评估预算函编号
+    status:'status',  // 状态
+    letter:'letter', //评估预算函
+    budgetAmount:'budgetAmount', //评估预算金额
+    supplierStoreName:'supplierStoreName', //供应商店铺名称
+    supplierCompanyName:'supplierCompanyName', //供应商公司名称
+    creator:'creator', //创建人
+    createTime:'createTime' //创建时间
+}
+
+const mapTemplateToTable = {
+    '评估预算函': mapFields.letterNo,
+    '状态': mapFields.status,
+    '评估预算函': mapFields.letter,
+    '评估预算金额': mapFields.budgetAmount,
+    '供应商店铺名称': mapFields.supplierStoreName,
+    '供应商公司名称': mapFields.supplierCompanyName,
+    '创建人': mapFields.creator,
+    '创建时间': mapFields.createTime
+}
+
+export const columns = [
+    {
+        type: 'index',
+        label: '序号',
+        width: '70px'
+    },
+    {
+        prop: mapFields.letterNo,
+        label: '评估预算函编号',
+        width: '120px',
+        required: true
+    },
+    {
+        prop: mapFields.status,
+        label: '状态',
+        width: '120px',
+        required: true
+    },
+    {
+        prop: mapFields.letter,
+        label: '评估预算函',
+        width: '156px',
+        required: true
+    },
+    {
+        prop: mapFields.budgetAmount,
+        label: '评估预算金额',
+        width: '180px',
+        required: true
+    },
+    {
+        prop: mapFields.supplierStoreName,
+        label: '供应商店铺名称',
+        width: '156px',
+        required: true
+    },
+    {
+        prop: mapFields.supplierCompanyName,
+        label: '供应商公司名称',
+        width: '156px',
+        required: false
+    },
+    {
+        prop: mapFields.creator,
+        label: '创建人',
+        width: '150px',
+        required: false
+    },
+    {
+        prop: mapFields.createTime,
+        label: '创建时间',
+        minWidth: '150px',
+        required: false
+    },
+]
+
+export function createErrorMessage(messages) {
+    const rows = Object.keys(messages)
+    return rows.reduce((prev, row, index) => {
+        const suffix = index === rows.length - 1 ? '</ul>' : ''
+        const content = prev + ` <li><strong style="font-weight:700">第${row}行</strong>,${messages[row]} </li> `
+        return content + suffix
+    }, '<ul>')
+}
+
+export const createFieldVerification = (message) => ({
+    notValidRows: [],
+    isValid: true,
+    message
+})
+
+export const template = Array(1).fill(1).map(() => Object.keys(mapTemplateToTable).reduce((prev, property) => {
+    prev[property] = ''
+    return prev
+}, {}))
+
+
+export const requiredFields = []
+
+
+export const helper = {
+    fields(sourceObject) {
+        return Object.keys(sourceObject)
+    },
+    values(sourceObject, fields, index = 0) {
+        return fields.map(field => {
+            return sourceObject[field][index]
+        })
+    },
+    write(sourceObject, fields) {
+        return fields.reduce((prev, currentKey) => ({
+            ...prev,
+            [currentKey]: sourceObject[currentKey]
+        }), {})
+    }
+}

+ 53 - 0
src/views/customerService/demandOrder/components/waitUploadSettlementLetter/index.vue

@@ -0,0 +1,53 @@
+<template>
+  <div>
+    <div style="display:flex;justify-content:flex-end">
+      <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="tableData"
+      style="margin: 15px 0 0 0"
+    />
+    <div style="display:flex;justify-content:flex-end">
+      <el-button size="mini" type="primary">保存</el-button>
+    </div>
+
+    <excel-upload-modal :visible.sync="xlsxVisible" />
+  </div>
+</template>
+
+
+<script>
+import ExcelUploadModal from "./xlsxUploadModal.vue"
+import { writeFile, utils } from "xlsx";
+import { template, columns } from "./_t"
+export default {
+  components:{
+    ExcelUploadModal
+  },
+  data(){
+    return {
+      table: {
+        stripe: true,
+        border: true,
+        'max-height': '800px'
+      },
+      columns,
+      tableData:[],
+      xlsxVisible:false
+    }
+  },
+  methods:{
+    onDownloadTemplate(){
+      const workBook = utils.book_new()
+      const workSheet = utils.json_to_sheet(template)
+      utils.book_append_sheet(workBook,workSheet,"sheet")
+      writeFile(workBook,"结算模板.xlsx",{
+        bookType:'xlsx'
+      })
+    }
+  }
+}
+</script>

+ 187 - 0
src/views/customerService/demandOrder/components/waitUploadSettlementLetter/xlsxUploadModal.vue

@@ -0,0 +1,187 @@
+<template>
+  <el-dialog
+    center
+    width="1024px"
+    title="导入结算函"
+    :visible="innerVisible"
+    :close-on-click-modal="false"
+    @close="() => innerVisible = false"
+  >
+    <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 style="width:100%;display:flex;justify-content:flex-end;margin-top:10px">
+      <el-button size="mini" type="primary">保存</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import companyHelper from '@/mixins/companyHelper'
+import { MessageBox } from 'element-ui'
+import dayjs from 'dayjs'
+
+import {
+  helper,
+  columns,
+  getTableProperty,
+  createErrorMessage,
+  createFieldVerification,
+  requiredFields,
+} from './_t'
+
+export default {
+  mixins: [companyHelper],
+  props: ['visible'],
+  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: {
+    validateTableHeader(header, importHeader) {
+      let isHeaderOk = true
+      if (header.length !== importHeader.length) return false
+      for (const index in header) {
+        const field = header[index]
+        const importField = importHeader[index]
+        if (field !== importField) {
+          console.log(field, importField)
+          isHeaderOk = false
+          break
+        }
+      }
+
+      return isHeaderOk
+    },
+    validateRequiredField(requiredFields) {
+        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() !== '')) {
+          verification.isValid = false
+          verification.notValidRows.push(index + 1)
+        }
+      })
+      return verification
+    },
+    /* 处理不合法的值,提示错误信息,并返回最终的验证状态 **/
+    handleNotValidFields(...validStates) {
+      const messages = {}
+      let isFinalValid = true
+
+      for (const validState of validStates) {
+        const { message, isValid, notValidRows } = validState
+        if (isValid) continue
+        isFinalValid = false
+
+        notValidRows.forEach(row => {
+          if (!messages[row]) messages[row] = []
+          messages[row].push(message)
+        })
+      }
+
+      return {
+        isFinalValid,
+        message: () => !isFinalValid && MessageBox({
+          type: 'warning',
+          title: '数据填写错误',
+          dangerouslyUseHTMLString: true,
+          message: createErrorMessage(messages),
+          customClass: 'error-message__wrapper'
+        })
+      }
+    },
+    /* 校验导入的数据 **/
+    validateFields(tableData = []) {
+      const mapTableFieldToTableData = {}
+      for (const tableItem of tableData) {
+        const propertys = Object.keys(tableItem)
+        for (const property of propertys) {
+          const value = tableItem[property]
+          if (!mapTableFieldToTableData[property]) mapTableFieldToTableData[property] = []
+          mapTableFieldToTableData[property].push(value)
+        }
+      }
+
+      return this.handleNotValidFields(
+        this.validateRequiredField(helper.write(mapTableFieldToTableData, requiredFields))
+      )
+    },
+    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).message()
+    },
+    async onSubmit() {
+      const { message, isFinalValid } = this.validateFields(this.tableData)
+      if (!isFinalValid) return message()
+
+      const list = this.tableData.map(tableItem => requsetFields.reduce((prev, currentKey) => ({
+        ...prev,
+        [currentKey]: currentKey === PROPERTYS.SEND_TIME ? dayjs(tableItem[currentKey] * 1000).format('YYYY-MM-DD HH:mm:ss') : tableItem[currentKey]
+      }), {}))
+
+      this.loading = true
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.error-message__wrapper{
+  width: 1024px;
+}
+</style>

+ 56 - 96
src/views/customerService/requiresOrder/detail.vue → src/views/customerService/demandOrder/detail.vue

@@ -4,7 +4,40 @@
       <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><el-collapse-item> -->
+            <el-collapse-item title="需求订单详情" name="1">
+              <demand-detail />
+            </el-collapse-item>
+            <el-collapse-item title="评估预算函管理" name="2">
+              <manage-budgeet-letter />
+            </el-collapse-item>
+
+            <el-collapse-item title="活动方案管理" name="3">
+              <manage-activity-scheme />
+            </el-collapse-item>
+
+            <el-collapse-item title="待客户上传确认凭证" name="4">
+              <credentials-node />
+            </el-collapse-item>
+
+            <el-collapse-item title="待平台审核执行凭证" name="5">
+              <wait-execute-certificate />
+            </el-collapse-item>
+
+            <el-collapse-item title="待供应商确认已执行" name="6">
+              <wait-supplier-confirm />
+            </el-collapse-item>
+
+            <el-collapse-item title="待客户确认已执行" name="7">
+              <wait-customer-confirm />
+            </el-collapse-item>
+
+            <el-collapse-item title="待供应商上传结算函" name="8">
+              <wait-upload-settlement-letter />
+            </el-collapse-item>
+
+            <el-collapse-item title="带客户确认结算函" name="9">
+              <normal-node />
+            </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
        </el-tabs>
@@ -15,42 +48,36 @@
   </div>
 </template>
 <script>
-import examFormss from "./exam-form.vue";
 import asyncRequest from "@/apis/service/sellOut/bargainList";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
-
-import {
-  costArr,
-  editColumns,
-  bargainingArr,
-  options1,
-  options2,
-  options3,
-  options4,
-  options5,
-  options6,
-  options7,
-  options8,
-  options9,
-  options10,
-  options11,
-  options12,
-  statusList,
-  rate_status_options,
-} from "./columns";
 import privateField from '../../../mixins/privateField';
+import DemandDetail from "./components/demandDetail/index.vue"
+import ManageBudgeetLetter from "./components/manageBudgetLetter.vue"
+import ManageActivityScheme from "./components/manageActivityScheme.vue"
+import WaitExecuteCertificate from "./components/waitExecuteCertificate.vue"
+import WaitSupplierConfirm from "./components/waitSupplierConfirm.vue"
+import WaitCustomerConfirm from "./components/waitCustomerConfirm.vue"
+import WaitUploadSettlementLetter from "./components/waitUploadSettlementLetter/index.vue"
+
+import { statusList } from "./columns";
 export default {
-  components: {
-    examFormss,
+  components: { 
+    DemandDetail, 
+    ManageBudgeetLetter, 
+    ManageActivityScheme, 
+    WaitExecuteCertificate,
+    WaitSupplierConfirm , 
+    WaitCustomerConfirm, 
+    WaitUploadSettlementLetter 
   },
-  name: "bargainListDetail",
+  name: "demandOrderDetail",
   mixins: [resToken,privateField],
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field", "isSupertube"]),
     powers() {
       const { btnList } = this.$store.getters;
-      const tran = btnList.find((item) => item.menu_route == "bargainListDetail") || {};
+      const tran = btnList.find((item) => item.menu_route == "demandOrderDetail") || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
@@ -65,24 +92,7 @@ export default {
   data() {
     return {
       size: "small",
-      eaxmList: [],
-      costArr,
-      bargainingArr,
-      editColumns,
-      options1,
-      options2,
-      options3,
-      options4,
-      options5,
-      options6,
-      options7,
-      options8,
-      options9,
-      options10,
-      options11,
-      options12,
       statusList,
-      rate_status_options,
       projectTabs: "1",
       activeNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "20"],
       newTime: "",
@@ -102,6 +112,9 @@ export default {
     this.initForm();
   },
   methods: {
+    handleUploadCredentials(data){
+      console.log(data)
+    },
     async initForm() {
       const { id, type } = this.$route.query;
       this.queryId = id;
@@ -169,59 +182,6 @@ export default {
     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);

+ 141 - 69
src/views/customerService/requiresOrder/index.vue → src/views/customerService/demandOrder/index.vue

@@ -26,24 +26,33 @@
         <template #table-header="{}">
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
-              <el-col :span="4" style="width: 301px;">
+              <el-col :span="4" style="width: 351px;">
                 <period-date-picker
-                  :start="parmValue.start"
-                  :end="parmValue.end"
-                  :width="'134px'"
+                  :start="parmValue[mapFields.createStart]"
+                  :end="parmValue[mapFields.createEnd]"
+                  :width="'160px'"
                   :size="searchSize"
-                  @timeReturned="handleTime"
+                  placeholder="创建"
+                  @timeReturned="(evt) => handleTime(evt,'create')"
                 />
               </el-col>
 
               <el-col :span="4" style="width:200px">
-                <el-select size="mini" placeholder="活动人数">
+                <el-select v-model="parmValue[mapFields.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 size="mini" placeholder="活动城市">
+                <el-select v-model="parmValue[mapFields.city]" size="mini" placeholder="活动城市" @change="
+                pageInfo.curr = 1;
+                parmValue.page = 1;
+                searchList();
+               ">
                   <el-option />
                 </el-select>
               </el-col>
@@ -74,23 +83,31 @@
             <el-row style="margin-top:10px">
               <el-col :span="4" style="width: 341px;">
                 <period-date-picker
-                  :start="parmValue.start"
-                  :end="parmValue.end"
+                  :start="parmValue[activityStart]"
+                  :end="parmValue[activityEnd]"
                   :width="'154px'"
                   :size="searchSize"
-                  @timeReturned="handleTime"
+                  @timeReturned="evt => handleTime(evt,'activity')"
                   placeholder="活动"
                 />
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
-                <el-select style="width:100%" size="mini" placeholder="当前状态">
+                <el-select v-model="parmValue[mapFields.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 style="width:100%" size="mini" placeholder="活动需求">
+                <el-select  v-model="parmValue[mapFields.activityDemand]" style="width:100%" size="mini" placeholder="活动需求" @change="
+                pageInfo.curr = 1;
+                parmValue.page = 1;
+                searchList();
+               ">
                   <el-option />
                 </el-select>
               </el-col>
@@ -99,38 +116,58 @@
             <el-row style="margin-top:10px">
               <el-col :span="4" style="width: 341px;">
                 <period-date-picker
-                  :start="parmValue.start"
-                  :end="parmValue.end"
+                  :start="parmValue[mapFields.consultationStart]"
+                  :end="parmValue[mapFields.consultationEnd]"
                   :width="'154px'"
                   :size="searchSize"
-                  @timeReturned="handleTime"
+                  @timeReturned="evt => handleTime(evt,'consultation')"
                   placeholder="咨询截止"
                 />
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
-                <el-input size="mini" placeholder="联系电话" />
+                <el-input v-model="parmValue[mapFields.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="需求编号" />
+                <el-input size="mini" placeholder="需求编号" v-model="parmValue[mapFields.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="需求项目">
+                <el-select size="mini" style="width:100%" placeholder="需求项目" v-model="parmValue[mapFields.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="需求创建人" />
+                <el-input size="mini" placeholder="需求创建人" v-model="parmValue[mapFields.demandCreator]" @change="
+                pageInfo.curr = 1;
+                parmValue.page = 1;
+                searchList();
+               "/>
               </el-col>
 
               <el-col :span="4" style="margin-left:10px">
-                <el-select size="mini" placeholder="需求企业">
+                <el-select size="mini" placeholder="需求企业" v-model="parmValue[mapFields.demandEnterprise]" @change="
+                pageInfo.curr = 1;
+                parmValue.page = 1;
+                searchList();
+               ">
                   <el-option />
                 </el-select>
               </el-col>
@@ -176,8 +213,19 @@
           >
             <i
               class="el-icon-view tb-icon"
-              
-               @click="getRouter('requiresOrderDetail', scope.row.bargainNo)"
+               @click="getRouter('demandOrderDetail', scope.row.bargainNo)"
+            ></i>
+          </el-tooltip>
+
+          <el-tooltip
+            v-if="powers.some((i) => i == '007')"
+            effect="dark"
+            content="编辑预算函"
+            placement="top"
+          >
+            <i
+              class="el-icon-edit tb-icon"
+               @click="getRouter('letterEditing', scope.row.bargainNo)"
             ></i>
           </el-tooltip>
         </template>
@@ -191,11 +239,49 @@
 <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
-import asyncRequest from "@/apis/service/sellOut/bargainList";
+import asyncRequest from "@/apis/service/customerService/demandOrder";
+import { createEmptyStringObject } from '../../../utils/static';
 import companyHelper from "@/mixins/companyHelper"
 import { listCol, statusList } from "./columns";
 import { mapGetters } from "vuex";
 
+const mapFields = {
+  //创建时间开始&结束
+  createStart:'createStart',
+  createEnd:'createEnd',
+  //活动时间开始&结束
+  activityStart:'activityStart',
+  activityEnd:'activityEnd',
+  //咨询时间开始&结束
+  consultationStart:'consultationStart',
+  consultationEnd:'consultationEnd',
+  //活动人数
+  activityPerson:'activityPersonNumber',
+  //活动城市
+  activityCity:'activiyCity',
+  //当前状态
+  currentStatus:'currentStatus',
+  //联系电话
+  mobile:'mobile',
+  //活动需求
+  activityDemand:'activityDemand',
+  //需求编号
+  demandNo:'demandNo',
+  //需求项目
+  demandProject:'demandProject',
+  //需求创建人
+  demandCreator:'demandCreator',
+  //需求企业
+  demandEnterprise:'demandEnterprise'
+}
+
+const mapDateFields = {
+  create:'创建',
+  activity:'活动',
+  consultation:"咨询"
+}
+
+
 export default {
   name: "bargainList",
   mixins: [mixinPage, resToken, companyHelper],
@@ -204,7 +290,7 @@ export default {
     powers() {
       const tran =
         this.$store.getters.btnList.find(
-          (item) => item.menu_route == "bargainList"
+          (item) => item.menu_route == "demandOrder"
         ) || {};
       const { action } = tran ?? {};
       return action ?? [];
@@ -212,29 +298,20 @@ export default {
   },
   data() {
     return {
+      mapFields,
       select: "1",
       s_input: "",
       customerCode: [], //客户公司code
       statusList,
       sitem: null,
-
       loading: true,
       showModel: false,
       isDetail: false,
       modelId: 0,
       parmValue: {
-        supplierName: "",
-        customer_code: "",
-        bidsNo: "", // 反馈编号
-        infoNo: "", // 竞价单编号
-        status: "", // 状态
-        bargainNo: "", //议价编号
-        status: "", //售后申请单处理状态
-        start: "",
-        end: "",
+        ...createEmptyStringObject(mapFields),
         page: 1, // 页码
         size: 15, // 每页显示条数
-        company_name:"",
       },
       // 表格 - 数据
       tableData: [],
@@ -260,28 +337,14 @@ export default {
     const { back } = this.$route.query;
     if (back) {
       this.parmValue = JSON.parse(back);
-      console.log(this.parmValue)
       const {page,size}=this.parmValue;
-      // this.parmValue.start = start || last_start;
-      // this.parmValue.end = end || last_end;
-
-      // if(this.parmValue.customer_code.length>0){
-      //     this.customerCode = [this.parmValue.customer_code] ;
-      // }
-      
        this.pageInfo= {
         size: size,
         curr: page,
         total: 0,
       }
-      //多选条件
-    this.select = this.parmValue.select;
-    // this.sselect = this.parmValue.sselect;
-    this.s_input = this.parmValue.s_input
-
     }else{
        this.select = "1";
-      //  this.sselect = "创建时间"
     }
     this.searchList();
   },
@@ -296,7 +359,6 @@ export default {
 
         //有多选框的条件
         this.parmValue.select = this.select ;
-        // this.parmValue.sselect = this.sselect ;
         this.parmValue.s_input= this.s_input;
         //
          let routerModel = {
@@ -315,15 +377,9 @@ export default {
       this.select = "1";
       this.s_input = "";
       this.parmValue = {
-        bidsNo: "", // 反馈编号
-        infoNo: "", // 竞价单编号
-        bargainNo: "", //议价编号
-        status: "", // 状态
-        start: "",
-        end: "",
+        ...createEmptyStringObject(mapFields),
         page: 1, // 页码
         size: 15, // 每页显示条数
-        company_name:"",
       };
       // 表格 - 分页
       this.pageInfo = {
@@ -369,12 +425,25 @@ export default {
     },
     // 列表搜索
     async searchList() {
-      if (
-        (this.parmValue.start !== "" && this.parmValue.end === "") ||
-        (this.parmValue.start === "" && this.parmValue.end !== "")
-      ) {
-        this.$message.warning("时间区间不完整!");
-        return;
+      // 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 startProp = mapFields[`${field}Start`]
+        const endProp = mapFields[`${field}End`]
+
+        if (
+          (this.parmValue[startProp] !== "" && this.parmValue[endProp] === "") ||
+          (this.parmValue[startProp] === "" && this.parmValue[endProp] !== "")
+          ) {
+            this.$message.warning(`${mapDateFields[field]}时间区间不完整!`);
+            return;
+          }
       }
 
       this.loading = true;
@@ -434,18 +503,21 @@ export default {
         });
     },
     // 时间选择事件
-    async handleTime(e) {
+    async handleTime(e,prefix) {
+      const startProp = mapFields[`${prefix}Start`]
+      const endProp = mapFields[`${prefix}End`]
+      
       if (e.startTime !== "") {
-        this.parmValue.start = e.startTime;
+        this.parmValue[startProp] = e.startTime;
       } else {
-        this.parmValue.start = "";
+        this.parmValue[startProp] = "";
       }
       if (e.endTime !== "") {
-        this.parmValue.end = e.endTime;
+        this.parmValue[endProp] = e.endTime;
       } else {
-        this.parmValue.end = "";
+        this.parmValue[endProp] = "";
       }
-      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
+      if (this.parmValue[startProp] !== "" && this.parmValue[endProp] !== "") {
         this.pageInfo.curr = 1;
         this.parmValue.page = 1;
         await this.searchList();

+ 197 - 0
src/views/customerService/demandOrder/letterEditing.vue

@@ -0,0 +1,197 @@
+<template>
+  <div style="padding:10px">
+    <ul style="margin-bottom:10px;display:flex;justify-content:flex-end;margin-top:10px;align-items:center;">
+      <li style="line-height:30px;margin-right:20px">
+       <span>非税总报价 : </span>
+       <span>28000</span>
+      </li>
+
+      <li style="line-height:30px;margin-right:20px">
+       <span>含税总报价 : </span>
+       <span>28000</span>
+      </li>
+
+      <li style="line-height:30px;margin-right:20px">
+       <span>总税额 : </span>
+       <span>28000</span>
+      </li>
+
+      <li>
+        <el-button size="mini" type="primary">保存</el-button>
+      </li>
+    </ul>
+
+    <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>
+</template>
+
+<script>
+import companyHelper from '@/mixins/companyHelper'
+import { MessageBox } from 'element-ui'
+import dayjs from 'dayjs'
+
+import {
+  helper,
+  columns,
+  getTableProperty,
+  createErrorMessage,
+  createFieldVerification,
+  requiredFields,
+} from './_template'
+
+export default {
+  mixins: [companyHelper],
+  props: ['visible'],
+  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: {
+    validateTableHeader(header, importHeader) {
+      let isHeaderOk = true
+      if (header.length !== importHeader.length) return false
+      for (const index in header) {
+        const field = header[index]
+        const importField = importHeader[index]
+        if (field !== importField) {
+          console.log(field, importField)
+          isHeaderOk = false
+          break
+        }
+      }
+
+      return isHeaderOk
+    },
+    validateRequiredField(requiredFields) {
+        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() !== '')) {
+          verification.isValid = false
+          verification.notValidRows.push(index + 1)
+        }
+      })
+      return verification
+    },
+    /* 处理不合法的值,提示错误信息,并返回最终的验证状态 **/
+    handleNotValidFields(...validStates) {
+      const messages = {}
+      let isFinalValid = true
+
+      for (const validState of validStates) {
+        const { message, isValid, notValidRows } = validState
+        if (isValid) continue
+        isFinalValid = false
+
+        notValidRows.forEach(row => {
+          if (!messages[row]) messages[row] = []
+          messages[row].push(message)
+        })
+      }
+
+      return {
+        isFinalValid,
+        message: () => !isFinalValid && MessageBox({
+          type: 'warning',
+          title: '数据填写错误',
+          dangerouslyUseHTMLString: true,
+          message: createErrorMessage(messages),
+          customClass: 'error-message__wrapper'
+        })
+      }
+    },
+    /* 校验导入的数据 **/
+    validateFields(tableData = []) {
+      const mapTableFieldToTableData = {}
+      for (const tableItem of tableData) {
+        const propertys = Object.keys(tableItem)
+        for (const property of propertys) {
+          const value = tableItem[property]
+          if (!mapTableFieldToTableData[property]) mapTableFieldToTableData[property] = []
+          mapTableFieldToTableData[property].push(value)
+        }
+      }
+
+      return this.handleNotValidFields(
+        this.validateRequiredField(helper.write(mapTableFieldToTableData, requiredFields))
+      )
+    },
+    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).message()
+    },
+    async onSubmit() {
+      const { message, isFinalValid } = this.validateFields(this.tableData)
+      if (!isFinalValid) return message()
+
+      const list = this.tableData.map(tableItem => requsetFields.reduce((prev, currentKey) => ({
+        ...prev,
+        [currentKey]: currentKey === PROPERTYS.SEND_TIME ? dayjs(tableItem[currentKey] * 1000).format('YYYY-MM-DD HH:mm:ss') : tableItem[currentKey]
+      }), {}))
+
+      this.loading = true
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.error-message__wrapper{
+  width: 1024px;
+}
+</style>

+ 0 - 353
src/views/customerService/requiresOrder/columns.js

@@ -1,353 +0,0 @@
-
-// 是否定制
-const options1 = [
-  { id: '0', name: '否' },
-  { id: '1', name: '是' }
-]
-// 专属类型
-const options2 = [
-  { id: '0', name: '非泰康' },
-  { id: '1', name: '泰康' }
-]
-// 销售权限
-const options3 = [
-  { id: '0', name: '无销售权限' },
-  { id: '1', name: '有销售权限' }
-]
-
-// 是否库存品
-const options4 = [
-  { id: '0', name: '非库存品' },
-  { id: '1', name: '库存品' }
-]
-// 是否启用实时金价
-const options5 = [
-  { id: '0', name: '否' },
-  { id: '1', name: '是' }
-]
-// 供货区域
-const options6 = [
-  { id: '1', name: '全国' },
-  { id: '2', name: '全国除偏远' }
-]
-// 是否启用阶梯
-const options7 = [
-  { id: '0', name: '否' },
-  { id: '1', name: '是' }
-]
-// 有无工差
-const options8 = [
-  { id: '0', name: '无工差' },
-  { id: '1', name: '有工差' }
-]
-// 配置要求
-const options9 = ['证书', '包装盒', '绒布袋', '标签', '其他']
-// 付款方式
-const options10 = [
-  { id: '0', name: '现结' },
-  { id: '1', name: '月清' },
-  { id: '2', name: '双月清' }
-]
-// 发货方式
-const options11 = [
-  { id: '0', name: '公司自提' },
-  { id: '1', name: '供应商包邮' }
-]
-
-const options12 = [
-  { id: '0', name: '一地' },
-  { id: '1', name: '多地' }
-]
-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' }
-  // 已选完商品,取消议价
-]
-const editColumns = [
-  {
-    prop: 'bargainNo',
-    label: '需求订单编号',
-    span: 6
-  },
-
-  {
-    prop: 'bidsNo',
-    label: '反馈商品编号',
-    span: 6
-  },
-  {
-    prop: 'infoNo',
-    label: '竞价单编号',
-    span: 6
-  },
-  {
-    prop: 'status',
-    label: '状态',
-    _slot_: 'status',
-    span: 6
-  },
-  {
-    prop: 'creater',
-    label: '创建人',
-    span: 6
-  },
-
-  {
-    prop: 'is_addrs',
-    label: '是否多地',
-    _slot_: 'is_addrs',
-    span: 4
-  },
-  {
-    prop: 'is_custom',
-    label: '是否定制',
-    _slot_: 'is_custom',
-    span: 4
-  },
-  {
-    prop: 'good_num',
-    label: '购买数量',
-    _slot_: 'good_num',
-    span: 4
-  },
-  {
-    prop: 'rate_status',
-    label: '预计通过节点',
-    _slot_: 'rate_status',
-    span: 6
-  },
-  {
-    prop: 'addtime',
-    label: '添加时间',
-    span: 6
-  },
-  {
-    prop: 'origin_addr',
-    label: '产地',
-    span: 6
-  },
-  {
-    prop: 'result_info',
-    label: '议价原因',
-    span: 12
-  },
-  {
-    prop: 'bargain_remark',
-    label: '议价备注',
-    span: 24
-  },
-
-  {
-    prop: 'sale_price',
-    label: '议价前售价',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'after_price',
-    label: '议价后售价',
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: 'cost_before_price',
-    label: '议价前工艺费',
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: 'cost_after_price',
-    label: '议价后工艺费',
-    append: '元',
-    span: 6
-  }
-
-]
-
-const costArr = [
-  {
-    prop: 'cert_fee',
-    label: '成本证书费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'pakge_fee',
-    label: '成本包装费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'cost_fee',
-    label: '成本工艺费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'mark_fee',
-    label: '成本加标费',
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: 'demo_fee',
-    label: '成本打样费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'open_fee',
-    label: '成本开模费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'delivery_fee',
-    label: '成本物流费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'nake_fee',
-    label: '成本裸价',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'total_fee',
-    label: '采购成本合计',
-    append: '元',
-    span: 24
-  }
-]
-
-const bargainingArr = [
-
-  {
-    prop: 'before_rate',
-    label: '议价前毛利率',
-    append: '%',
-    span: 12
-  },
-
-  {
-    prop: 'after_rate',
-    label: '议价后毛利率',
-    append: '%',
-    span: 12
-  }
-
-]
-
-const listCol = [
-  {
-    prop: '需求订单编号prop',
-    label: '需求订单编号',
-    width: '155'
-  },
-
-  {
-    prop: '活动城市prop',
-    label: '活动城市',
-    width: '155'
-  },
-
-  {
-    prop: '需求项目prop',
-    label: '需求项目',
-    width: '120px'
-  },
-  {
-    prop: '活动人数prop',
-    label: '活动人数',
-    width: '155'
-  },
-
-  {
-    prop: '活动需求prop',
-    label: '活动需求',
-    width: '155px'
-  },
-  {
-    prop: '活动时间prop',
-    label: '活动时间',
-    width: '155px'
-  },
-  {
-    prop: '活动总天数prop',
-    label: '活动总天数',
-    'min-width': '180'
-  },
-  {
-    prop: '咨询截止时间prop',
-    label: '咨询截止时间',
-    'min-width': '125'
-  },
-  {
-    prop: '状态prop',
-    label: '状态',
-    minWidth: '150px'
-  },
-  {
-    prop: '需求公司prop',
-    label: '需求公司',
-    'width': '120'
-  },
-  {
-    prop: '联系电话prop',
-    label: '联系电话',
-    'width': '120'
-  },
-  {
-    prop: '创建人prop',
-    label: '创建人',
-    'width': '120'
-  },
-  {
-    prop: '创建时间prop',
-    label: '创建时间',
-    'width': '120'
-  },
-
-  {
-    prop: '',
-    label: '操作',
-    fixed: 'right',
-    _noset_: true,
-    _slot_: 'operation',
-    width: 50
-  }
-]
-
-const rate_status_options = [
-  { id: '0', label: '全部无法通过' },
-  { id: '1', label: '业务主管通过' },
-  { id: '2', label: '财务主管通过' },
-  { id: '3', label: 'boss通过' }
-]
-
-export {
-  listCol, options1,
-  options2,
-  options3,
-  options4,
-  options5,
-  options6,
-  options7,
-  options8,
-  options9,
-  options10,
-  options11,
-  options12,
-  editColumns,
-  bargainingArr,
-  costArr,
-  statusList,
-  rate_status_options
-}

+ 0 - 300
src/views/customerService/requiresOrder/exam-form.vue

@@ -1,300 +0,0 @@
-<template>
-  <el-form
-    ref="ruleForm"
-    v-loading="loading"
-    :model="ruleForm"
-    status-icon
-    :rules="rulesThis"
-    :label-width="labelWidth || '100px'"
-    class="demo-ruleForm bargain-list-exam-form"
-    :size="'mini'"
-  >
-    <el-row>
-      <el-col :span="8"
-        ><el-form-item label="审核状态" prop="state">
-          <el-radio-group
-            v-model="ruleForm.state"
-            placeholder="审核状态"
-            style="width: 100%"
-            :disabled="disabled"
-            @change="stateChange"
-          >
-            <el-radio v-for="item in stateList" :key="item.value" :label="item.value">{{
-              item.label
-            }}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-form-item label="附件" prop="adjunct">
-          <div
-            class="adjunct"
-            :class="{
-              disabled: disabled,
-            }"
-          >
-            <p v-if="ruleForm.adjunct">
-              <el-link :underline="false" :href="ruleForm.adjunct" target="_blank">{{
-                ruleForm.adjunct_name
-              }}</el-link>
-              <el-link class="fr" type="info" :underline="false" v-if="!disabled"
-                ><i class="el-icon-circle-close" @click="close_url" :size="'mini'"></i
-              ></el-link>
-            </p>
-            <p v-else class="no">支持pdf格式文件</p>
-            <div v-if="ruleForm.adjunct === ''">
-              <file-upload-pdf
-                class="Upload"
-                :accept="'.pdf'"
-                :multiple="false"
-                :size="'mini'"
-                :uploadcondition="beforeAvatarUpload"
-                @UploadErrorEvent="UploadErrorEvent"
-                @UploadSuccessEvent="UploadSuccessEvent"
-              />
-            </div>
-          </div>
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-button
-          v-if="!disabled"
-          :size="'mini'"
-          type="primary"
-          class="fr"
-          @click="submitForm"
-          >保 存
-        </el-button>
-      </el-col>
-      <el-col :span="24">
-        <el-form-item label="审核备注" prop="remark">
-          <el-input
-            v-model="ruleForm.remark"
-            type="textarea"
-            placeholder="审核备注"
-            :disabled="disabled"
-            maxlength="250"
-            :autosize="{ minRows: 2, maxRows: 2 }"
-            show-word-limit
-          />
-        </el-form-item>
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-
-<script>
-import { replaceTextWrapAndSpace } from "@/utils";
-export default {
-  name: "ExamForm",
-  props: ["size", "disabled", "labelWidth", "sitem"],
-  /**
-   * 属性集合
-   * @param {String}        size             : 组件大小             非必填
-   * @param {Array}         statusList       : 驳回至备选项          必填
-   * @param {Boolean}       disabled         : 是否禁用              必填
-   * @param {Boolean}       isMust           : 是否需要展示驳回节点   必填
-   *
-   *
-   */
-  /**
-   * 事件集合
-   * @searchChange             : 选中值变化调用   抛出选中数据
-   */
-  data() {
-    return {
-      loading: false,
-      stateList: [
-        {
-          value: "1",
-          label: "通过",
-        },
-        {
-          value: "0",
-          label: "驳回",
-        },
-      ],
-      showModelThis: this.showModel,
-      ruleForm: {
-        state: "1", // 通过or驳回
-        adjunct: "", // 驳回至
-        adjunct_name: "",
-        remark: "",
-      },
-      rulesThis: this.rules,
-      rules: {
-        state: [
-          {
-            required: true,
-            message: "请选择审核状态",
-            trigger: "change",
-          },
-        ],
-
-        remark: [{ required: true, message: "请输入审核备注", trigger: "blur" }],
-      },
-    };
-  },
-  watch: {
-    newTime: function () {
-      this.initForm();
-    },
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.stateChange();
-      this.loading = false;
-    },
-    stateChange() {
-      this.rulesThis.remark[0].required = this.ruleForm.state !== "1";
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { status, remark, adjunct, adjunct_name } = this.sitem;
-          this.ruleForm = {
-            state: status + "" || "1", // 通过or驳回
-            adjunct: adjunct || "",
-            adjunct_name: adjunct_name || "",
-            remark: remark || "",
-          };
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          const { remark } = this.ruleForm;
-          this.ruleForm.remark = replaceTextWrapAndSpace(remark);
-          this.$emit("searchChange", this.ruleForm);
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    close_url() {
-      this.ruleForm.adjunct_name = "";
-      this.ruleForm.adjunct = "";
-      this.$refs.ruleForm.validateField("adjunct");
-    },
-    //附件上传失败
-    async UploadErrorEvent(e) {
-      console.log(e);
-      if (e !== "break") {
-        this.$message.error("附件上传失败!");
-        this.$refs.ruleForm.validateField("adjunct");
-      }
-    },
-    //附件上传成功
-    async UploadSuccessEvent(data) {
-      console.log(data);
-      const { url, name } = data;
-      if (url === "noToken") {
-        await this.logout();
-      } else {
-        this.ruleForm.adjunct_name = name;
-        this.ruleForm.adjunct = url;
-        this.$message.success("附件上传成功!");
-        this.$refs.ruleForm.validateField("adjunct");
-      }
-    },
-    //判断附件规格
-    beforeAvatarUpload(file) {
-      console.log(file);
-      let isJPG = false,
-        isLt2M = false;
-      if (file) {
-        if (file.type === "application/pdf") {
-          isJPG = true;
-        }
-        isLt2M = file.size / 1024 / 1024 < 1;
-        if (!isJPG) {
-          this.$message.error("附件格式不正确!");
-        }
-        if (!isLt2M) {
-          this.$message.error("附件大小不能超过 1MB!");
-        }
-      }
-
-      return isJPG && isLt2M;
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.bargain-list-exam-form {
-  .exa {
-    margin: 20px 0 0 30px;
-    font-size: 14px;
-    font-weight: bold;
-  }
-
-  .adjunct {
-    position: relative;
-    width: 100%;
-    -webkit-appearance: none;
-    background-color: #ffffff;
-    background-image: none;
-    border-radius: 4px;
-    border: 1px solid #dcdfe6;
-    -webkit-box-sizing: border-box;
-    box-sizing: border-box;
-    color: #606266;
-    display: inline-block;
-    font-size: inherit;
-    height: 40px;
-    line-height: 40px;
-    outline: none;
-    //
-    -webkit-transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
-    transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
-    width: 100%;
-    p {
-      // width: calc(100% - 100px);
-      width: 100%;
-      padding: 0 10px;
-      height: 38px;
-      line-height: 38px;
-      overflow: hidden;
-      color: #606266;
-      &.no {
-        color: #c0c4cc;
-      }
-    }
-    &.disabled {
-      p {
-        background-color: #f5f7fa;
-        border-color: #dfe4ed;
-
-        cursor: not-allowed;
-        color: #c0c4cc;
-      }
-    }
-
-    .Upload {
-      z-index: 5;
-      // width: ;
-    }
-    .yulan {
-      position: absolute;
-      width: 50px;
-      text-align: center;
-      right: 0;
-      top: 0;
-      cursor: pointer;
-      // background: chocolate;
-    }
-  }
-}
-</style>

+ 1 - 1
src/views/customerService/workbench/components/baseForm.vue

@@ -651,7 +651,7 @@
   </el-form>
 </template>
 <script>
-import asyncRequest from "@/apis/service/purchaseIn/workbench";
+import asyncRequest from "@/apis/service/customerService/workbench";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 import baseFormAddEdit from "./baseFormAddEdit";

+ 1 - 1
src/views/customerService/workbench/detail.vue

@@ -248,7 +248,7 @@
   </div>
 </template>
 <script>
-import asyncRequest from "@/apis/service/purchaseIn/workbench";
+import asyncRequest from "@/apis/service/customerService/workbench";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 import baseForm from "./components/baseForm";

+ 1 - 1
src/views/customerService/workbench/index.vue

@@ -113,7 +113,7 @@
   </div>
 </template>
 <script>
-import asyncRequest from "@/apis/service/purchaseIn/workbench";
+import asyncRequest from "@/apis/service/customerService/workbench";
 import roleLevel from "@/assets/js/roleLevel";
 import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";

+ 26 - 0
src/views/platformService/invoice/_static.js

@@ -0,0 +1,26 @@
+const search = {
+    //创建时间开始结束
+    createStart:'create_start',
+    createEnd:'create_end',
+    //供应商企业
+    supplier:'supplier',
+    //需求订单编号
+    demandOrderNo:'demandOrderNo',
+    //发票状态
+    invoiceStatus:'invoiceStatus',
+    //开票日期开始结束
+    openStart:'openStart',
+    openEnd:'openEnd',
+    //发票代码
+    invoiceCode:'invCode',
+    //发票号码
+    invoiceNumber:'invNum',
+    //发票类型
+    invoiceType:'invoiceType',
+    invoiceApplyNo:'invoiceApplyNo'
+}
+
+export const mapPropertys = {
+    //搜索表单
+    search
+}

+ 94 - 0
src/views/platformService/invoice/columns.js

@@ -0,0 +1,94 @@
+
+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' }
+  // 已选完商品,取消议价
+]
+
+const listCol = [
+  {
+    prop: 'todo',
+    label: '开票申请编号',
+    width: '155'
+  },
+
+  {
+    prop: 'todo',
+    label: '开票申请发票类型',
+    width: '155'
+  },
+
+  {
+    prop: 'todo',
+    label: '需求订单编号',
+    width: '120px'
+  },
+  {
+    prop: 'todo',
+    label: '供应商企业',
+    width: '155'
+  },
+
+  {
+    prop: 'todo',
+    label: '发票记录编号',
+    width: '155px'
+  },
+  {
+    prop: 'todo',
+    label: '发票状态',
+    width: '155px'
+  },
+  {
+    prop: 'todo',
+    label: '发票类型',
+    'min-width': '180'
+  },
+  {
+    prop: 'todo',
+    label: '发票代码',
+    'min-width': '125'
+  },
+  {
+    prop: 'todo',
+    label: '发票号码',
+    minWidth: '150px'
+  },
+
+  {
+    prop: 'todo',
+    label: '开票日期'
+  },
+  {
+    prop: 'todo',
+    label: '税前金额'
+  },
+  {
+    prop: 'todo',
+    label: '税后金额'
+  },
+  {
+    prop:'todo',
+    label:'校验码'
+  },
+  {
+    prop:'todo',
+    label:'驳回原因'
+  },
+  // {
+  //   prop: '',
+  //   label: '操作',
+  //   fixed: 'right',
+  //   _noset_: true,
+  //   _slot_: 'operation',
+  //   width: 50
+  // }
+]
+
+export {
+  listCol, 
+  statusList
+}

+ 0 - 0
src/views/platformService/invoiceReview/components/invoice-modal.vue → src/views/platformService/invoice/components/invoice-modal.vue


+ 5 - 27
src/views/platformService/invoiceReview/components/template.js → src/views/platformService/invoice/components/template.js

@@ -3,35 +3,13 @@ const mapTemplateToTable = {
   '发票类型': 'supplierNo',
   '发票代码': 'companyNo',
   '发票号码': 'customerNo',
-  '一级品类ID': 'cat_id1',
-  '二级品类ID': 'cat_id2',
-  '三级品类ID': 'cat_id',
-  '商品单位ID': 'good_unit',
-  '商品名称': 'good_name',
-  '销售单价': 'sale_price',
-  '数量': 'good_num',
-  '销售总额': 'sale_total',
-  '税率': 'good_tax',
-  '采购单价': 'cgd_price',
-  '采购总额': 'cgd_total',
-  '采购毛利率': 'cgd_tax',
-  '平台订单号': 'poCode',
-  '收货人': 'contactor',
-  '联系电话': 'mobile',
-  '联系地址': 'addr',
-  '发货时间': 'sendtime'
+  '价税合计': 'cat_id1',
+  '发票金额': 'cat_id2',
+  '校验码': 'cat_id',
+  '开票日期': 'good_unit'
 }
 
 export const getTableProperty = (key) => mapTemplateToTable[key]
-export const getTableLabel = (field) => {
-  const keys = Object.keys(mapTemplateToTable)
-  for (const key of keys) {
-    if (mapTemplateToTable[key] === field) {
-      return key
-    }
-  }
-}
-
 export const PROPERTYS = {
   COMPANY_NO: getTableProperty('销售方公司编码'),
   CUSTOMER_NO: getTableProperty('购买方公司编码'),
@@ -55,7 +33,7 @@ export const PROPERTYS = {
   WORK_CODE: getTableProperty('单据号')
 }
 
-export const template = Array(1001).fill(1).map(() => ({
+export const template = Array(1).fill(1).map(() => ({
   '所属平台ID': '58',
   '供应商公司编码': 'QS2206011407522117',
   '销售方公司编码': 'GS2302231323386950',

+ 73 - 57
src/views/platformService/invoiceReview/index.vue → src/views/platformService/invoice/index.vue

@@ -26,20 +26,37 @@
         <template #table-header="{}">
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
-              <el-col :span="4" style="width: 301px; padding: 0 10px 0 0px">
+              <el-col :span="4" style="width: 360px; padding: 0 10px 0 0px">
                 <period-date-picker
-                  :start="parmValue.start"
-                  :end="parmValue.end"
-                  :width="'134px'"
+                  :start="parmValue[mapPropertys.search.createStart]"
+                  :end="parmValue[mapPropertys.search.createEnd]"
+                  :width="'164px'"
                   :size="searchSize"
                   @timeReturned="handleTime"
+                  placeholder="创建"
+                />
+              </el-col>
+
+              <el-col :span="3" style="margin-right:10px">
+                <el-select v-model="parmValue[mapPropertys.search.supplier]" size="mini" placeholder="供应商企业" style="width:100%"
+                  @change=" pageInfo.curr = 1;
+                           parmValue.page = 1;
+                          searchList();" 
+                  />
+              </el-col>
+
+              <el-col :span="3" style="margin-right:10px">
+                <el-input v-model="parmValue[mapPropertys.search.demandOrderNo]" size="mini" placeholder="需求订单编号" style="width:100%" 
+                       @change=" pageInfo.curr = 1;
+                           parmValue.page = 1;
+                          searchList();" 
                 />
               </el-col>
 
               <el-col :span="4" style="width: 150px;margin-right:10px">
                 <el-select
                   :size="searchSize"
-                  v-model="parmValue.status"
+                  v-model="parmValue[mapPropertys.search.invoiceStatus]"
                   clearable
                   placeholder="开票状态"
                   @change="
@@ -57,23 +74,6 @@
                   </el-option>
                 </el-select>
               </el-col>
-              
-              <el-col :span="4">
-                <el-select
-                  :size="searchSize"
-                  v-model="parmValue['付款状态属性']"
-                  style="width:100%"
-                  clearable
-                  placeholder="付款状态"
-                  @change="
-                    pageInfo.curr = 1;
-                    parmValue.page = 1;
-                    searchList();
-                  "
-                >
-                  <el-option />
-                </el-select>
-              </el-col>
 
               <el-col :span="3" style="width: 66px; float: right">
                 <el-button
@@ -98,16 +98,30 @@
             </el-row>
 
             <el-row style="margin-top:10px">
-              <el-col :span="4" style="width: 260px;margin-right:10px">
-                <el-input size="mini" placeholder="供应商" v-model="parmValue['供应商属性']" />
+              <el-col :span="4" style="width: 360px; padding: 0 10px 0 0px">
+                <period-date-picker
+                  :start="parmValue[mapPropertys.search.openStart]"
+                  :end="parmValue[mapPropertys.search.openEnd]"
+                  :width="'164px'"
+                  :size="searchSize"
+                  @timeReturned="() => handleTime(true)"
+                  placeholder="开票"
+                />
               </el-col>
 
               <el-col :span="4" style="margin-right:10px">
-                <el-input size="mini" placeholder="需求订单编号" v-model="parmValue['需求订单编号属性']" />
+                <el-input size="mini" placeholder="发票代码" v-model="parmValue[mapPropertys.search.invoiceCode]" 
+                  @change=" pageInfo.curr = 1;
+                           parmValue.page = 1;
+                          searchList();"  />
               </el-col>
        
               <el-col :span="4">
-                <el-input size="mini" placeholder="平台结算编号" v-model="parmValue['平台结算编号属性']" />
+                <el-input size="mini" placeholder="发票号码" v-model="parmValue[mapPropertys.search.invoiceNumber]"
+                  @change=" pageInfo.curr = 1;
+                           parmValue.page = 1;
+                          searchList();" 
+                 />
               </el-col>
 
               <el-col :span="3" style="width:140px;float: right">
@@ -131,6 +145,24 @@
                 </el-button>
               </el-col>
             </el-row>
+
+            <el-row style="margin-top:10px">
+              <el-col :span="4" style="margin-right:10px">
+                <el-select v-model="parmValue[mapPropertys.search.invoiceType]" size="mini" placeholder="发票类型" style="width:100%"
+                  @change=" pageInfo.curr = 1;
+                           parmValue.page = 1;
+                          searchList();" 
+                  />
+              </el-col>
+
+              <el-col :span="4">
+                <el-input size="mini" placeholder="发票申请编号" v-model="parmValue[mapPropertys.search.invoiceApplyNo]"
+                  @change=" pageInfo.curr = 1;
+                           parmValue.page = 1;
+                          searchList();" 
+                 />
+              </el-col>
+            </el-row>
           </div>
         </template>
         <template #status="{ scope }">
@@ -189,8 +221,11 @@ import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/bargainList";
 import companyHelper from "@/mixins/companyHelper"
 import { listCol, statusList } from "./columns";
+import { mapPropertys } from "./_static"
+import { createEmptyStringObject } from "@/utils/static"
 import { mapGetters } from "vuex";
 
+
 export default {
   name: "bargainList",
   mixins: [mixinPage, resToken, companyHelper],
@@ -209,6 +244,7 @@ export default {
     return {
       select: "1",
       s_input: "",
+      mapPropertys,
       customerCode: [], //客户公司code
       statusList,
       sitem: null,
@@ -218,22 +254,9 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
-        付款状态属性:"",
-        供应商属性:"",
-        平台结算编号属性:"",
-        需求订单编号属性:"",
-        supplierName:"",
-        customer_code: "",
-        bidsNo: "", // 反馈编号
-        infoNo: "", // 竞价单编号
-        status: "", // 状态
-        bargainNo: "", //议价编号
-        status: "", //售后申请单处理状态
-        start: "",
-        end: "",
+        ...createEmptyStringObject(mapPropertys.search),
         page: 1, // 页码
         size: 15, // 每页显示条数
-        company_name:"",
       },
       // 表格 - 数据
       tableData: [],
@@ -307,20 +330,10 @@ export default {
       this.select = "1";
       this.s_input = "";
       this.parmValue = {
-        bidsNo: "", // 反馈编号
-        infoNo: "", // 竞价单编号
-        bargainNo: "", //议价编号
-        status: "", // 状态
-        start: "",
-        end: "",
+        ...createEmptyStringObject(mapPropertys.search),
         page: 1, // 页码
         size: 15, // 每页显示条数
-        company_name :"",
-        付款状态属性 : "",
-            供应商属性 : "",
-        平台结算编号属性 : "",
-        需求订单编号属性 : "",
-      };
+      }
       // 表格 - 分页
       this.pageInfo = {
         size: 15,
@@ -430,16 +443,19 @@ export default {
         });
     },
     // 时间选择事件
-    async handleTime(e) {
+    async handleTime(e,isOpen = false) {
+      const startProp = isOpen ? mapPropertys.search.openStart : mapPropertys.search.createStart
+      const endProp = isOpen ? mapPropertys.search.openEnd : mapPropertys.search.createEnd
+
       if (e.startTime !== "") {
-        this.parmValue.start = e.startTime;
+        this.parmValue[startProp] = e.startTime;
       } else {
-        this.parmValue.start = "";
+        this.parmValue[startProp] = "";
       }
       if (e.endTime !== "") {
-        this.parmValue.end = e.endTime;
+        this.parmValue[endProp] = e.endTime;
       } else {
-        this.parmValue.end = "";
+        this.parmValue[endProp] = "";
       }
       if (this.parmValue.start !== "" && this.parmValue.end !== "") {
         this.pageInfo.curr = 1;

+ 0 - 0
src/views/serviceParam/supplierStore/components/shopDecoration.vue → src/views/platformService/invoice/发票审核管理


+ 0 - 349
src/views/platformService/invoiceReview/columns.js

@@ -1,349 +0,0 @@
-
-// 是否定制
-const options1 = [
-  { id: '0', name: '否' },
-  { id: '1', name: '是' }
-]
-// 专属类型
-const options2 = [
-  { id: '0', name: '非泰康' },
-  { id: '1', name: '泰康' }
-]
-// 销售权限
-const options3 = [
-  { id: '0', name: '无销售权限' },
-  { id: '1', name: '有销售权限' }
-]
-
-// 是否库存品
-const options4 = [
-  { id: '0', name: '非库存品' },
-  { id: '1', name: '库存品' }
-]
-// 是否启用实时金价
-const options5 = [
-  { id: '0', name: '否' },
-  { id: '1', name: '是' }
-]
-// 供货区域
-const options6 = [
-  { id: '1', name: '全国' },
-  { id: '2', name: '全国除偏远' }
-]
-// 是否启用阶梯
-const options7 = [
-  { id: '0', name: '否' },
-  { id: '1', name: '是' }
-]
-// 有无工差
-const options8 = [
-  { id: '0', name: '无工差' },
-  { id: '1', name: '有工差' }
-]
-// 配置要求
-const options9 = ['证书', '包装盒', '绒布袋', '标签', '其他']
-// 付款方式
-const options10 = [
-  { id: '0', name: '现结' },
-  { id: '1', name: '月清' },
-  { id: '2', name: '双月清' }
-]
-// 发货方式
-const options11 = [
-  { id: '0', name: '公司自提' },
-  { id: '1', name: '供应商包邮' }
-]
-
-const options12 = [
-  { id: '0', name: '一地' },
-  { id: '1', name: '多地' }
-]
-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' }
-  // 已选完商品,取消议价
-]
-const editColumns = [
-  {
-    prop: 'bargainNo',
-    label: '议价单编号',
-    span: 6
-  },
-
-  {
-    prop: 'bidsNo',
-    label: '反馈商品编号',
-    span: 6
-  },
-  {
-    prop: 'infoNo',
-    label: '竞价单编号',
-    span: 6
-  },
-  {
-    prop: 'status',
-    label: '状态',
-    _slot_: 'status',
-    span: 6
-  },
-  {
-    prop: 'creater',
-    label: '创建人',
-    span: 6
-  },
-
-  {
-    prop: 'is_addrs',
-    label: '是否多地',
-    _slot_: 'is_addrs',
-    span: 4
-  },
-  {
-    prop: 'is_custom',
-    label: '是否定制',
-    _slot_: 'is_custom',
-    span: 4
-  },
-  {
-    prop: 'good_num',
-    label: '购买数量',
-    _slot_: 'good_num',
-    span: 4
-  },
-  {
-    prop: 'rate_status',
-    label: '预计通过节点',
-    _slot_: 'rate_status',
-    span: 6
-  },
-  {
-    prop: 'addtime',
-    label: '添加时间',
-    span: 6
-  },
-  {
-    prop: 'origin_addr',
-    label: '产地',
-    span: 6
-  },
-  {
-    prop: 'result_info',
-    label: '议价原因',
-    span: 12
-  },
-  {
-    prop: 'bargain_remark',
-    label: '议价备注',
-    span: 24
-  },
-
-  {
-    prop: 'sale_price',
-    label: '议价前售价',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'after_price',
-    label: '议价后售价',
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: 'cost_before_price',
-    label: '议价前工艺费',
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: 'cost_after_price',
-    label: '议价后工艺费',
-    append: '元',
-    span: 6
-  }
-
-]
-
-const costArr = [
-  {
-    prop: 'cert_fee',
-    label: '成本证书费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'pakge_fee',
-    label: '成本包装费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'cost_fee',
-    label: '成本工艺费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'mark_fee',
-    label: '成本加标费',
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: 'demo_fee',
-    label: '成本打样费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'open_fee',
-    label: '成本开模费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'delivery_fee',
-    label: '成本物流费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'nake_fee',
-    label: '成本裸价',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'total_fee',
-    label: '采购成本合计',
-    append: '元',
-    span: 24
-  }
-]
-
-const bargainingArr = [
-
-  {
-    prop: 'before_rate',
-    label: '议价前毛利率',
-    append: '%',
-    span: 12
-  },
-
-  {
-    prop: 'after_rate',
-    label: '议价后毛利率',
-    append: '%',
-    span: 12
-  }
-
-]
-
-const listCol = [
-  {
-    prop: '平台结算编号',
-    label: '平台结算编号',
-    width: '155'
-  },
-
-  {
-    prop: '需求订单编号',
-    label: '需求订单编号',
-    width: '155'
-  },
-
-  {
-    prop: '供应商',
-    label: '供应商',
-    width: '120px'
-  },
-  {
-    prop: '平台结算编码',
-    label: '平台结算编码',
-    width: '155'
-  },
-
-  {
-    prop: '平台结算总金额',
-    label: '平台结算总金额',
-    width: '155px'
-  },
-  {
-    prop: '回款状态',
-    label: '回款状态',
-    width: '155px'
-  },
-  {
-    prop: '已回款金额',
-    label: '已回款金额',
-    'min-width': '180'
-  },
-  {
-    prop: '回款中金额',
-    label: '回款中金额',
-    'min-width': '125'
-  },
-  {
-    prop: '未回款金额',
-    label: '未回款金额',
-    minWidth: '150px'
-  },
-
-  {
-    prop: '开票状态',
-    label: '开票状态'
-  },
-  {
-    prop: '已开票金额',
-    label: '已开票金额'
-  },
-  {
-    prop: '开票中金额',
-    label: '开票中金额'
-  },
-  {
-    prop:'未开票金额',
-    label:'未开票金额'
-  },
-  {
-    prop: '',
-    label: '操作',
-    fixed: 'right',
-    _noset_: true,
-    _slot_: 'operation',
-    width: 50
-  }
-]
-
-const rate_status_options = [
-  { id: '0', label: '全部无法通过' },
-  { id: '1', label: '业务主管通过' },
-  { id: '2', label: '财务主管通过' },
-  { id: '3', label: 'boss通过' }
-]
-
-export {
-  listCol, options1,
-  options2,
-  options3,
-  options4,
-  options5,
-  options6,
-  options7,
-  options8,
-  options9,
-  options10,
-  options11,
-  options12,
-  editColumns,
-  bargainingArr,
-  costArr,
-  statusList,
-  rate_status_options
-}

+ 0 - 409
src/views/platformService/invoiceReview/detail.vue

@@ -1,409 +0,0 @@
-<template>
-  <div class="bargainListDetail">
-    <div class="bargainListDetail-main" v-if="powers.some((i) => i == '007')">
-      <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">
-              <show-data-table
-                style="padding: -5px 0 10px 0"
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :sitem="sitem"
-                :columns="editColumns"
-              >
-                <template slot="status">
-                  <el-tag
-                    :size="tablebtnSize"
-                    :type="
-                      (statusList.find((item) => item.id == sitem.status) || {}).type ||
-                      ''
-                    "
-                    v-text="
-                      (statusList.find((item) => item.id == sitem.status) || {}).label ||
-                      '--'
-                    "
-                  ></el-tag>
-                </template>
-
-                <template slot="is_addrs">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (options12.find((item) => item.id == sitem.is_addrs) || {}).name ||
-                      '--'
-                    "
-                  ></el-tag>
-                </template>
-                <template slot="is_custom">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (options1.find((item) => item.id == sitem.is_custom) || {}).name ||
-                      '--'
-                    "
-                  ></el-tag>
-                </template>
-
-                <template slot="good_num">
-                  <span>{{ sitem.good_num ? sitem.good_num : "0" }}{{ sitem.unit }}</span>
-                </template>
-                <template slot="rate_status">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (
-                        rate_status_options.find(
-                          (item) => item.id == sitem.rate_status + ''
-                        ) || {}
-                      ).label || '--'
-                    "
-                  ></el-tag>
-                </template>
-              </show-data-table>
-            </el-collapse-item>
-            <el-collapse-item title="商品信息" name="20">
-              <show-goods-data-table
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :type="'3'"
-                :skucode="''"
-                :spucode="sitem.spuCode"
-                :iscgd="true"
-              />
-            </el-collapse-item>
-            <el-collapse-item
-              title="商品成本信息"
-              name="6"
-              v-if="isDisplayPrivateField('1')"
-            >
-              <show-data-table
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :sitem="sitem"
-                :columns="costArr"
-              >
-              </show-data-table>
-            </el-collapse-item>
-            <el-collapse-item
-              title="商品毛利信息"
-              name="7"
-              v-if="isDisplayPrivateField('3')"
-            >
-              <show-data-table
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :sitem="sitem"
-                :columns="bargainingArr"
-              >
-              </show-data-table>
-            </el-collapse-item>
-            <el-collapse-item
-              title="业务部门审批"
-              name="2"
-              v-if="
-                (eaxmList.some((item) => item.info_status + '' == '0') ||
-                  (status == '0' && ppowers.some((i) => i == '0'))) &&
-                !isSupertube
-              "
-            >
-              <exam-formss
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :disabled="!(status == '0' && ppowers.some((i) => i == '0'))"
-                :sitem="orderItem"
-                @searchChange="examFormSubmit($event, '业务主管')"
-              />
-            </el-collapse-item>
-          </el-collapse>
-        </el-tab-pane>
-        <el-tab-pane label="审批记录" name="3">
-          <process-time-line
-            v-if="newTime !== ''"
-            :newTime="newTime"
-            :type="'YJD'"
-            :orderCode="queryId"
-          />
-        </el-tab-pane>
-
-        <el-tab-pane label="流程图" name="5">
-          <flow-chart process_id="13" :orderCode="queryId" />
-        </el-tab-pane>
-      </el-tabs>
-    </div>
-    <div v-else>
-      <no-auth></no-auth>
-    </div>
-  </div>
-</template>
-<script>
-import examFormss from "./exam-form.vue";
-import asyncRequest from "@/apis/service/sellOut/bargainList";
-import resToken from "@/mixins/resToken";
-import { mapGetters } from "vuex";
-
-import {
-  editColumns,
-  costArr,
-  bargainingArr,
-  options1,
-  options2,
-  options3,
-  options4,
-  options5,
-  options6,
-  options7,
-  options8,
-  options9,
-  options10,
-  options11,
-  options12,
-  statusList,
-  rate_status_options,
-} from "./columns";
-import privateField from '../../../mixins/privateField';
-export default {
-  components: {
-    examFormss,
-  },
-  name: "bargainListDetail",
-  mixins: [resToken,privateField],
-  computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field", "isSupertube"]),
-    powers() {
-      const { btnList } = this.$store.getters;
-      const tran = btnList.find((item) => item.menu_route == "bargainListDetail") || {};
-      const { action } = tran ?? {};
-      return action ?? [];
-    },
-    ppowers() {
-      const { roleProcess } = this.$store.getters;
-      const tran = roleProcess.find((i) => i.process_type === "YJD") || {};
-      const { action } = tran ?? {};
-      return action ?? [];
-    },
-  },
-
-  data() {
-    return {
-      size: "small",
-      eaxmList: [],
-      costArr,
-      bargainingArr,
-      editColumns,
-      options1,
-      options2,
-      options3,
-      options4,
-      options5,
-      options6,
-      options7,
-      options8,
-      options9,
-      options10,
-      options11,
-      options12,
-      statusList,
-      rate_status_options,
-      projectTabs: "1",
-      activeNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "20"],
-      newTime: "",
-      loading: false,
-      queryType: "",
-      queryId: "",
-      status: "",
-      sitem: null,
-
-      orderItem: {},
-      moneyDirItem: {},
-      moneyItem: {},
-      BossItem: {},
-    };
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    async initForm() {
-      const { id, type } = this.$route.query;
-      this.queryId = id;
-      this.queryType = type;
-      this.projectTabs = "1";
-      this.loading = true;
-      await this.initData();
-      this.loading = false;
-    },
-
-    handleClick(row) {
-      console.log(row);
-    },
-    async refresh() {
-      this.routeReGoto("bargainList", {});
-    },
-    async initData() {
-      this.loading = true;
-      const { code, message, data } = await asyncRequest.detail({
-        bargainNo: this.queryId,
-      });
-
-      this.eaxmList = [];
-      this.loading = false;
-      if (code === 0) {
-        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);
-      }
-    },
-    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);
-      this.loading = false;
-      // console.log("res", data);
-      if (code === 0) {
-        this.$notify.success({
-          title: title + "成功!",
-          message: "",
-        });
-        await this.initForm();
-      } else if (code >= 100 && code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(message);
-      }
-    },
-  },
-};
-</script>
-<style lang="scss" scoped>
-.bargainListDetail {
-  position: relative;
-  height: 100%;
-  width: 100%;
-  box-sizing: border-box;
-  .bargainListDetail-main {
-    position: relative;
-    padding: 10px;
-    height: 100%;
-    width: 100%;
-  }
-  .bargainListDetail-title {
-    border-top: 1px solid #ebeef5;
-    span {
-      height: 50px;
-      line-height: 50px;
-      font-family: "微软雅黑", sans-serif;
-      font-weight: 400;
-      font-style: normal;
-      font-size: 16fpx;
-      text-align: left;
-    }
-  }
-  /deep/ .ddiv {
-    border-top: 1px solid #dcdfe6;
-  }
-  /deep/ .dtitle {
-    width: 40px;
-    text-align: center;
-    height: 100%;
-    min-height: 100%;
-    ul {
-      padding: 12px 0 0 0;
-    }
-  }
-  /deep/ .dmain {
-    padding: 20px 0 0 0;
-    width: calc(100% - 40px);
-    border-left: 1px solid #dcdfe6;
-  }
-}
-</style>

+ 0 - 300
src/views/platformService/invoiceReview/exam-form.vue

@@ -1,300 +0,0 @@
-<template>
-  <el-form
-    ref="ruleForm"
-    v-loading="loading"
-    :model="ruleForm"
-    status-icon
-    :rules="rulesThis"
-    :label-width="labelWidth || '100px'"
-    class="demo-ruleForm bargain-list-exam-form"
-    :size="'mini'"
-  >
-    <el-row>
-      <el-col :span="8"
-        ><el-form-item label="审核状态" prop="state">
-          <el-radio-group
-            v-model="ruleForm.state"
-            placeholder="审核状态"
-            style="width: 100%"
-            :disabled="disabled"
-            @change="stateChange"
-          >
-            <el-radio v-for="item in stateList" :key="item.value" :label="item.value">{{
-              item.label
-            }}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-form-item label="附件" prop="adjunct">
-          <div
-            class="adjunct"
-            :class="{
-              disabled: disabled,
-            }"
-          >
-            <p v-if="ruleForm.adjunct">
-              <el-link :underline="false" :href="ruleForm.adjunct" target="_blank">{{
-                ruleForm.adjunct_name
-              }}</el-link>
-              <el-link class="fr" type="info" :underline="false" v-if="!disabled"
-                ><i class="el-icon-circle-close" @click="close_url" :size="'mini'"></i
-              ></el-link>
-            </p>
-            <p v-else class="no">支持pdf格式文件</p>
-            <div v-if="ruleForm.adjunct === ''">
-              <file-upload-pdf
-                class="Upload"
-                :accept="'.pdf'"
-                :multiple="false"
-                :size="'mini'"
-                :uploadcondition="beforeAvatarUpload"
-                @UploadErrorEvent="UploadErrorEvent"
-                @UploadSuccessEvent="UploadSuccessEvent"
-              />
-            </div>
-          </div>
-        </el-form-item>
-      </el-col>
-      <el-col :span="8">
-        <el-button
-          v-if="!disabled"
-          :size="'mini'"
-          type="primary"
-          class="fr"
-          @click="submitForm"
-          >保 存
-        </el-button>
-      </el-col>
-      <el-col :span="24">
-        <el-form-item label="审核备注" prop="remark">
-          <el-input
-            v-model="ruleForm.remark"
-            type="textarea"
-            placeholder="审核备注"
-            :disabled="disabled"
-            maxlength="250"
-            :autosize="{ minRows: 2, maxRows: 2 }"
-            show-word-limit
-          />
-        </el-form-item>
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-
-<script>
-import { replaceTextWrapAndSpace } from "@/utils";
-export default {
-  name: "ExamForm",
-  props: ["size", "disabled", "labelWidth", "sitem"],
-  /**
-   * 属性集合
-   * @param {String}        size             : 组件大小             非必填
-   * @param {Array}         statusList       : 驳回至备选项          必填
-   * @param {Boolean}       disabled         : 是否禁用              必填
-   * @param {Boolean}       isMust           : 是否需要展示驳回节点   必填
-   *
-   *
-   */
-  /**
-   * 事件集合
-   * @searchChange             : 选中值变化调用   抛出选中数据
-   */
-  data() {
-    return {
-      loading: false,
-      stateList: [
-        {
-          value: "1",
-          label: "通过",
-        },
-        {
-          value: "0",
-          label: "驳回",
-        },
-      ],
-      showModelThis: this.showModel,
-      ruleForm: {
-        state: "1", // 通过or驳回
-        adjunct: "", // 驳回至
-        adjunct_name: "",
-        remark: "",
-      },
-      rulesThis: this.rules,
-      rules: {
-        state: [
-          {
-            required: true,
-            message: "请选择审核状态",
-            trigger: "change",
-          },
-        ],
-
-        remark: [{ required: true, message: "请输入审核备注", trigger: "blur" }],
-      },
-    };
-  },
-  watch: {
-    newTime: function () {
-      this.initForm();
-    },
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-      this.rulesThis = this.rules;
-      await this.resetForm();
-      this.stateChange();
-      this.loading = false;
-    },
-    stateChange() {
-      this.rulesThis.remark[0].required = this.ruleForm.state !== "1";
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { status, remark, adjunct, adjunct_name } = this.sitem;
-          this.ruleForm = {
-            state: status + "" || "1", // 通过or驳回
-            adjunct: adjunct || "",
-            adjunct_name: adjunct_name || "",
-            remark: remark || "",
-          };
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          const { remark } = this.ruleForm;
-          this.ruleForm.remark = replaceTextWrapAndSpace(remark);
-          this.$emit("searchChange", this.ruleForm);
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    close_url() {
-      this.ruleForm.adjunct_name = "";
-      this.ruleForm.adjunct = "";
-      this.$refs.ruleForm.validateField("adjunct");
-    },
-    //附件上传失败
-    async UploadErrorEvent(e) {
-      console.log(e);
-      if (e !== "break") {
-        this.$message.error("附件上传失败!");
-        this.$refs.ruleForm.validateField("adjunct");
-      }
-    },
-    //附件上传成功
-    async UploadSuccessEvent(data) {
-      console.log(data);
-      const { url, name } = data;
-      if (url === "noToken") {
-        await this.logout();
-      } else {
-        this.ruleForm.adjunct_name = name;
-        this.ruleForm.adjunct = url;
-        this.$message.success("附件上传成功!");
-        this.$refs.ruleForm.validateField("adjunct");
-      }
-    },
-    //判断附件规格
-    beforeAvatarUpload(file) {
-      console.log(file);
-      let isJPG = false,
-        isLt2M = false;
-      if (file) {
-        if (file.type === "application/pdf") {
-          isJPG = true;
-        }
-        isLt2M = file.size / 1024 / 1024 < 1;
-        if (!isJPG) {
-          this.$message.error("附件格式不正确!");
-        }
-        if (!isLt2M) {
-          this.$message.error("附件大小不能超过 1MB!");
-        }
-      }
-
-      return isJPG && isLt2M;
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.bargain-list-exam-form {
-  .exa {
-    margin: 20px 0 0 30px;
-    font-size: 14px;
-    font-weight: bold;
-  }
-
-  .adjunct {
-    position: relative;
-    width: 100%;
-    -webkit-appearance: none;
-    background-color: #ffffff;
-    background-image: none;
-    border-radius: 4px;
-    border: 1px solid #dcdfe6;
-    -webkit-box-sizing: border-box;
-    box-sizing: border-box;
-    color: #606266;
-    display: inline-block;
-    font-size: inherit;
-    height: 40px;
-    line-height: 40px;
-    outline: none;
-    //
-    -webkit-transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
-    transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
-    width: 100%;
-    p {
-      // width: calc(100% - 100px);
-      width: 100%;
-      padding: 0 10px;
-      height: 38px;
-      line-height: 38px;
-      overflow: hidden;
-      color: #606266;
-      &.no {
-        color: #c0c4cc;
-      }
-    }
-    &.disabled {
-      p {
-        background-color: #f5f7fa;
-        border-color: #dfe4ed;
-
-        cursor: not-allowed;
-        color: #c0c4cc;
-      }
-    }
-
-    .Upload {
-      z-index: 5;
-      // width: ;
-    }
-    .yulan {
-      position: absolute;
-      width: 50px;
-      text-align: center;
-      right: 0;
-      top: 0;
-      cursor: pointer;
-      // background: chocolate;
-    }
-  }
-}
-</style>

+ 59 - 0
src/views/platformService/settlement/_static.js

@@ -0,0 +1,59 @@
+const search = {
+  // 创建开始结束时间
+  createStart:'start',
+  createEnd:'end',
+  // 开票状态
+  openStatus:"status",
+  // 需求订单编号
+  demandOrderNo:'demandOrderNo',
+  // 平台订单编号
+  platformNo:'platformNo',
+  //回款状态
+  paymentCollectionStatus:'paymentCollectionStatus'
+}
+
+const invoice = {
+  // 发票申请编码
+  invoiceNo:'invoiceNo',
+  // 发票代码
+  invoiceCode:'invoiceCode',
+  // 发票类型
+  invoiceType:'invoiceType',
+  // 发票号码
+  invoiceNumber:'invoiceNumber',
+  // 开票日期
+  openTime:'opennTime',
+  // 税后金额
+  afterTax:'afterTax',
+  // 税前金额
+  beforeTax:'beforeTax',
+  // 校验码
+  checkNumber:'checkNumber',
+  // 发票名称
+  invoiceName:'invoiceName'
+}
+
+const approve = {
+  //凭证图片
+  certificateImage:'certificateImage',
+  
+  //发票抬头
+  invoiceTitle:'invoiceTitle',
+  //发票类型
+  invoiceType:'invoiceType',
+  
+  //状态
+  status:"status",
+  //备注
+  remark: 'remark'
+}
+
+//字段映射
+export const mapPropertys = {
+  //搜索表单
+  search,
+  //发票相关
+  invoice,
+  //审批相关
+  approve
+}

+ 98 - 277
src/views/platformService/settlement/columns.js

@@ -1,63 +1,3 @@
-
-// 是否定制
-const options1 = [
-  { id: '0', name: '否' },
-  { id: '1', name: '是' }
-]
-// 专属类型
-const options2 = [
-  { id: '0', name: '非泰康' },
-  { id: '1', name: '泰康' }
-]
-// 销售权限
-const options3 = [
-  { id: '0', name: '无销售权限' },
-  { id: '1', name: '有销售权限' }
-]
-
-// 是否库存品
-const options4 = [
-  { id: '0', name: '非库存品' },
-  { id: '1', name: '库存品' }
-]
-// 是否启用实时金价
-const options5 = [
-  { id: '0', name: '否' },
-  { id: '1', name: '是' }
-]
-// 供货区域
-const options6 = [
-  { id: '1', name: '全国' },
-  { id: '2', name: '全国除偏远' }
-]
-// 是否启用阶梯
-const options7 = [
-  { id: '0', name: '否' },
-  { id: '1', name: '是' }
-]
-// 有无工差
-const options8 = [
-  { id: '0', name: '无工差' },
-  { id: '1', name: '有工差' }
-]
-// 配置要求
-const options9 = ['证书', '包装盒', '绒布袋', '标签', '其他']
-// 付款方式
-const options10 = [
-  { id: '0', name: '现结' },
-  { id: '1', name: '月清' },
-  { id: '2', name: '双月清' }
-]
-// 发货方式
-const options11 = [
-  { id: '0', name: '公司自提' },
-  { id: '1', name: '供应商包邮' }
-]
-
-const options12 = [
-  { id: '0', name: '一地' },
-  { id: '1', name: '多地' }
-]
 const statusList = [
   { id: '0', label: '待业务主管审核', type: '' },
   { id: '1', label: '业务主管已通过', type: 'success' },
@@ -68,256 +8,133 @@ const statusList = [
 ]
 const editColumns = [
   {
-    prop: 'bargainNo',
-    label: '议价单编号',
-    span: 6
+    prop: 'todo',
+    label: '平台订单编号',
+    span: 8
   },
 
   {
-    prop: 'bidsNo',
-    label: '反馈商品编号',
-    span: 6
+    prop: 'todo',
+    label: '业务订单编号',
+    span: 8
   },
   {
-    prop: 'infoNo',
-    label: '竞价单编号',
-    span: 6
+    prop: 'todo',
+    label: '创建时间',
+    span: 8
   },
   {
-    prop: 'status',
-    label: '状态',
-    _slot_: 'status',
-    span: 6
-  },
-  {
-    prop: 'creater',
-    label: '创建人',
-    span: 6
+    prop: 'todo',
+    label: '总金额',
+    span: 8
   },
 
   {
-    prop: 'is_addrs',
-    label: '是否多地',
-    _slot_: 'is_addrs',
-    span: 4
+    prop: 'todo',
+    label: '未回款金额',
+    span: 8
   },
   {
-    prop: 'is_custom',
-    label: '是否定制',
-    _slot_: 'is_custom',
-    span: 4
+    prop: 'todo',
+    label: '已回款金额',
+    span: 8
   },
   {
-    prop: 'good_num',
-    label: '购买数量',
-    _slot_: 'good_num',
-    span: 4
-  },
-  {
-    prop: 'rate_status',
-    label: '预计通过节点',
-    _slot_: 'rate_status',
-    span: 6
-  },
-  {
-    prop: 'addtime',
-    label: '添加时间',
-    span: 6
-  },
-  {
-    prop: 'origin_addr',
-    label: '产地',
-    span: 6
-  },
-  {
-    prop: 'result_info',
-    label: '议价原因',
-    span: 12
-  },
-  {
-    prop: 'bargain_remark',
-    label: '议价备注',
-    span: 24
-  },
-
-  {
-    prop: 'sale_price',
-    label: '议价前售价',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'after_price',
-    label: '议价后售价',
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: 'cost_before_price',
-    label: '议价前工艺费',
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: 'cost_after_price',
-    label: '议价后工艺费',
-    append: '元',
-    span: 6
-  }
-
-]
-
-const costArr = [
-  {
-    prop: 'cert_fee',
-    label: '成本证书费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'pakge_fee',
-    label: '成本包装费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'cost_fee',
-    label: '成本工艺费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'mark_fee',
-    label: '成本加标费',
-    append: '元',
-    span: 6
-  },
-
-  {
-    prop: 'demo_fee',
-    label: '成本打样费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'open_fee',
-    label: '成本开模费',
-    append: '元',
-    span: 6
-  },
-  {
-    prop: 'delivery_fee',
-    label: '成本物流费',
-    append: '元',
-    span: 6
+    prop: 'status',
+    label: '状态',
+    _slot_: 'status',
+    span: 8
   },
   {
-    prop: 'nake_fee',
-    label: '成本裸价',
-    append: '元',
-    span: 6
+    prop: 'todo',
+    label: '已开票金额',
+    span: 8
   },
   {
-    prop: 'total_fee',
-    label: '采购成本合计',
-    append: '元',
-    span: 24
+    prop: 'todo',
+    label: '未开票金额',
+    span: 8
   }
 ]
 
-const bargainingArr = [
-
+const demandOrderColumns = [
   {
-    prop: 'before_rate',
-    label: '议价前毛利率',
-    append: '%',
-    span: 12
-  },
-
-  {
-    prop: 'after_rate',
-    label: '议价后毛利率',
-    append: '%',
-    span: 12
+    prop: 'todo',
+    label: '平台订单编号',
+    span: 8
   }
-
 ]
-
 const listCol = [
   {
-    prop: 'bargainNo',
-    label: '议价编号',
+    prop: 'todo',
+    label: '平台结算编号',
     width: '155'
   },
 
   {
-    prop: 'infoNo',
-    label: '竞价单编号',
+    prop: 'todo',
+    label: '需求订单编号',
     width: '155'
   },
 
   {
-    prop: 'status',
-    label: '状态',
-    _slot_: 'status',
+    prop: 'todo',
+    label: '供应商',
     width: '120px'
   },
   {
-    prop: 'bidsNo',
-    label: '采返商品编号',
+    prop: 'todo',
+    label: '平台结算编码',
     width: '155'
   },
 
   {
-    prop: 'companyNo',
-    label: '业务公司编号',
-    width: '155px'
+    prop: 'todo',
+    label: '平台结算金额',
+    width: '100px'
   },
   {
-    prop: 'companyName',
-    label: '业务公司名称',
-    width: '155px'
+    prop: 'todo',
+    label: '回款状态',
+    width: '125px',
+    _slot_:'status',
   },
-  // {
-  //   prop: "good_img",
-  //   label: "图片",
-  //   _slot_: "good_img",
-  //   "width": "50"
-  // },
   {
-    prop: 'good_name',
-    label: '商品名称',
-    _slot_: 'good_name',
-    'min-width': '180'
+    prop: 'todo',
+    label: '已回款金额',
+    'min-width': '100px'
   },
   {
-    prop: 'can',
-    label: '分类',
-    _slot_: 'can',
-    'min-width': '125'
+    prop: 'todo',
+    label: '回款中金额',
+    'min-width': '100px'
   },
-
-  // {
-  //   prop: "except_code",
-  //   label: "预算单价",
-  //   _slot_: "except_code",
-  //   width: 110,
-
-  // },
   {
-    prop: 'company_name',
-    label: '申请人部门',
-    minWidth: '150px'
+    prop: 'todo',
+    label: '未回款金额',
+    minWidth: '100px'
   },
-
   {
     prop: 'creater',
-    label: '申请人',
-    'width': '75'
+    label: '开票状态',
+    _slot_:'status',
+    minWidth: '120px'
+  },
+  {
+    prop: 'todo',
+    label: '已开票金额',
+    minWidth: '100px'
+  },
+  {
+    prop: 'todo',
+    label: '开票中金额',
+    minWidth: '100px'
+  },
+  {
+    prop: 'todo',
+    label: '未开票金额',
+    minWidth: '100px'
   },
-
   {
     prop: '',
     label: '操作',
@@ -328,29 +145,33 @@ const listCol = [
   }
 ]
 
-const rate_status_options = [
-  { id: '0', label: '全部无法通过' },
-  { id: '1', label: '业务主管通过' },
-  { id: '2', label: '财务主管通过' },
-  { id: '3', label: 'boss通过' }
+const invoiceColumns = [
+  {
+    prop: 'todo',
+    label: '抬头',
+    span:24
+  },
+  {
+    prop: 'todo',
+    label: '纳税人识别号',
+    span:24
+  },
+  {
+    prop: 'todo',
+    label: '地址、电话',
+    span:24
+  },
+  {
+    prop: 'todo',
+    label: '开户行及账号',
+    span:24
+  }
 ]
 
 export {
-  listCol, options1,
-  options2,
-  options3,
-  options4,
-  options5,
-  options6,
-  options7,
-  options8,
-  options9,
-  options10,
-  options11,
-  options12,
+  listCol,
+  invoiceColumns,
   editColumns,
-  bargainingArr,
-  costArr,
   statusList,
-  rate_status_options
+  demandOrderColumns
 }

+ 170 - 0
src/views/platformService/settlement/components/invoiceManagement/_t.js

@@ -0,0 +1,170 @@
+import { mapPropertys } from "../../_static"
+const { invoice } = mapPropertys
+
+export const manuallyUploadRules = {
+    [invoice.invoiceType]:[
+        {
+            trigger: "blur",
+            message: "请选择发票类型",
+            required: true
+        }
+    ],
+    [invoice.invoiceNumber]: [
+        {
+            trigger: "blur",
+            message: "请输入发票号码",
+            required: true
+        }
+    ],
+    [invoice.invoiceCode]: [
+        {
+            trigger: "blur",
+            message: "请选择发票代码",
+            required: true
+        }
+    ],
+    [invoice.openTime]: [
+        {
+            trigger: "blur",
+            message: "请选择开票时间",
+            required: true
+        }
+    ],
+    [invoice.beforeTax]: [
+        {
+            trigger: "blur",
+            message: "请输入金额",
+            required: true
+        }
+    ],
+    [invoice.invoiceName]: [
+        {
+            trigger: "blur",
+            message: "请输入发票名称",
+            required: true
+        }
+    ],
+    [invoice.checkNumber]: [
+        {
+            trigger: "blur",
+            message: "请输入校验码",
+            required: true
+        }
+    ]
+}
+
+const mapTemplateToTable = {
+    '发票申请编号': invoice.invoiceNo,
+    '发票类型': invoice.invoiceType,
+    '发票号码': invoice.invoiceNumber,
+    '开票日期': invoice.openTime,
+    '税后金额': invoice.afterTax,
+    '发票代码': invoice.invoiceCode,
+    '税前金额': invoice.beforeTax,
+    '校验码': invoice.checkNumber
+}
+
+export const columns = [
+    {
+        type: 'index',
+        label: '序号',
+        width: '70px'
+    },
+    {
+        prop: invoice.invoiceNo,
+        label: '发票申请编号',
+        width: '110px',
+        required: true
+    },
+    {
+        prop: invoice.invoiceType,
+        label: '发票类型',
+        width: '120px',
+        required: true
+    },
+    {
+        prop: invoice.invoiceNumber,
+        label: '发票号码',
+        width: '156px',
+        required: true
+    },
+    {
+        prop: invoice.openTime,
+        label: '开票日期',
+        width: '180px',
+        required: true
+    },
+    {
+        prop: invoice.afterTax,
+        label: '税后金额',
+        width: '156px',
+        required: true
+    },
+    {
+        prop: invoice.invoiceCode,
+        label: '发票代码',
+        width: '156px',
+        required: false
+    },
+    {
+        prop: invoice.beforeTax,
+        label: '税前金额',
+        width: '150px',
+        required: false
+    },
+    {
+        prop: invoice.checkNumber,
+        label: '校验码',
+        minWidth: '150px',
+        required: false
+    },
+]
+
+export function createErrorMessage(messages) {
+    const rows = Object.keys(messages)
+    return rows.reduce((prev, row, index) => {
+        const suffix = index === rows.length - 1 ? '</ul>' : ''
+        const content = prev + ` <li><strong style="font-weight:700">第${row}行</strong>,${messages[row]} </li> `
+        return content + suffix
+    }, '<ul>')
+}
+
+export const createFieldVerification = (message) => ({
+    notValidRows: [],
+    isValid: true,
+    message
+})
+
+export const template = Array(1).fill(1).map(() => Object.keys(mapTemplateToTable).reduce((prev, property) => {
+    prev[property] = ''
+    return prev
+}, {}))
+
+export const requsetFields = []
+
+export const requiredFields = [
+    invoice.invoiceNo,
+    invoice.invoiceNumber,
+    invoice.invoiceType,
+    invoice.afterTax,
+    invoice.openTime
+]
+
+export const numberFields = []
+
+export const helper = {
+    fields(sourceObject) {
+        return Object.keys(sourceObject)
+    },
+    values(sourceObject, fields, index = 0) {
+        return fields.map(field => {
+            return sourceObject[field][index]
+        })
+    },
+    write(sourceObject, fields) {
+        return fields.reduce((prev, currentKey) => ({
+            ...prev,
+            [currentKey]: sourceObject[currentKey]
+        }), {})
+    }
+}

+ 64 - 0
src/views/platformService/settlement/components/invoiceManagement/index.vue

@@ -0,0 +1,64 @@
+<template>
+  <div>
+    <div style="display:flex;justify-content:flex-end">
+      <el-button size="mini" @click="onDownloadTemplate">下载发票模板</el-button>
+      <el-button size="mini" type="primary" @click="xlsxVisible = true">上传发票信息</el-button>
+    </div>
+    <el-table size="mini" style="margin-top:10px" border>
+      <el-table-column label="发票记录编号"></el-table-column>
+      <el-table-column label="发票状态"></el-table-column>
+      <el-table-column label="发票类型"></el-table-column>
+      <el-table-column label="发票代码"></el-table-column>
+      <el-table-column label="发票号码"></el-table-column>
+      <el-table-column label="开票日期"></el-table-column>
+      <el-table-column label="税前金额"></el-table-column>
+      <el-table-column label="税后金额"></el-table-column>
+      <el-table-column label="校验码"></el-table-column>
+      <el-table-column label="操作">
+        <template #header>
+          <div style="display:flex;justify-content:space-between">
+            <span>操作</span>
+            <el-button size="mini" type="text" @click="manuallyVisible = true">添加</el-button>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <div style="display:flex;justify-content:flex-end">
+      <el-button size="mini" type="primary">保存</el-button>
+    </div>
+
+    <manually-upload-modal :visible.sync="manuallyVisible" />
+    <excel-upload-modal :visible.sync="xlsxVisible" />
+  </div>
+</template>
+
+
+<script>
+import ManuallyUploadModal from "./manuallyUploadModal.vue"
+import ExcelUploadModal from "./xlsxUploadModal.vue"
+import { writeFile, utils } from "xlsx";
+import { template } from "./_t"
+export default {
+  components:{
+    ManuallyUploadModal,
+    ExcelUploadModal
+  },
+  data(){
+    return {
+      manuallyVisible:false,
+      xlsxVisible:false
+    }
+  },
+  methods:{
+    onDownloadTemplate(){
+      const workBook = utils.book_new()
+      const workSheet = utils.json_to_sheet(template)
+      utils.book_append_sheet(workBook,workSheet,"sheet")
+      writeFile(workBook,"开票模板.xlsx",{
+        bookType:'xlsx'
+      })
+    }
+  }
+}
+</script>

+ 115 - 0
src/views/platformService/settlement/components/invoiceManagement/manuallyUploadModal.vue

@@ -0,0 +1,115 @@
+<template>
+  <el-dialog :visible="innerVisible" title="上传发票" align="center" @close="handleClose" :close-on-click-modal="false">
+    <el-form :rules="rules" :model="ruleForm" ref="ruleForm"  label-width="90px" size="mini">
+      <el-form-item label="扫码枪">
+        <el-input v-model="scanValue" type="textarea" placeholder="请在扫码完成后手动回车" @keyup.native.enter="handleEnterParse" />
+      </el-form-item>
+      <el-form-item label="发票类型" :prop="invoice.invoiceType">
+        <el-select v-model="ruleForm[invoice.invoiceType]" style="width:100%" placeholder="发票类型">
+          <el-option />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="发票代码" :prop="invoice.invoiceCode">
+        <el-input v-model="ruleForm[invoice.invoiceCode]" placeholder="发票代码" />
+      </el-form-item>
+      <el-form-item label="发票号码" :prop="invoice.invoiceNumber">
+        <el-input v-model="ruleForm[invoice.invoiceNumber]"  placeholder="发票号码" />
+      </el-form-item>
+      <el-form-item label="税前金额" :prop="invoice.beforeTax">
+        <el-input v-model="ruleForm[invoice.beforeTax]" placeholder="税前金额" />
+      </el-form-item>
+      <el-form-item label="校验码" :prop="invoice.checkNumber">
+        <el-input v-model="ruleForm[invoice.checkNumber]"  placeholder="校验码" />
+      </el-form-item>
+      <el-form-item label="开票日期" :prop="invoice.openTime">
+        <el-date-picker v-model="ruleForm[invoice.openTime]" style="width:100%" placeholder="开票日期" />
+      </el-form-item>
+
+      <el-form-item style="display:flex;justify-content:flex-end">
+        <el-button type="primary" @click="onSubmit">保&nbsp存</el-button>
+      </el-form-item>
+    </el-form>
+  </el-dialog>
+</template>
+
+<script>
+import dayjs from "dayjs"
+import { manuallyUploadRules } from "./_t"
+import { mapPropertys } from "./../../_static"
+export default {
+  props:['visible'],
+  computed:{
+    innerVisible:{
+      get(){
+        return this.visible
+      },
+      set(newVal){
+        this.$emit('update:visible',newVal)
+      }
+    }
+  },
+  data(){
+    return {
+      scanValue:"",
+      rules:manuallyUploadRules,
+      invoice:mapPropertys.invoice,
+      ruleForm:{
+        [mapPropertys.invoice.invoiceType]:"",
+        [mapPropertys.invoice.invoiceCode]:"",
+        [mapPropertys.invoice.beforeTax]:"",
+        [mapPropertys.invoice.openTime]: "",
+        [mapPropertys.invoice.invoiceNumber]:"",
+        [mapPropertys.invoice.checkNumber]:"",
+      }
+    }
+  },
+  methods:{
+    handleClose(){
+      this.innerVisible = false
+    },
+    handleEnterParse(evt){
+      /* 校验是否有中文逗号 **/
+      if(this.scanValue.indexOf(',') >= 0){
+        this.scanValue = ""
+        this.$message.error("不能包含中文逗号")
+        return
+      }
+      
+      const result = this.scanValue.split(",")
+      if(result.length !== 8 && result.length !== 9){
+        this.scanValue = ""
+        this.$message.error("扫码枪识别数据格式不正确,请重新扫描")
+      }
+      
+      const [_1,invoiceType,invCode,invNumber,subtotal_amount,open_time,checkNumber] = result
+      let _open_time = ""
+      
+      if(open_time){
+        const year = open_time.slice(0, 4);
+        const month = open_time.slice(4, 6);
+        const day = open_time.slice(6);
+        _open_time = dayjs(`${year}-${month}-${day}`).format("YYYY-MM-DD HH:mm:ss");
+      }
+      
+      this.scanValue = ""
+      const { invoice } = mapPropertys
+      this.ruleForm = {
+        [invoice.invoiceType]:invoiceType,
+        [invoice.invoiceCode]:invCode,
+        [invoice.beforeTax]:subtotal_amount,
+        [invoice.openTime]: _open_time,
+        [invoice.invoiceNumber]:invNumber,
+        [invoice.checkNumber] :checkNumber
+      }
+    },
+    async onSubmit(){
+      try{
+        await this.$refs.ruleForm.validate()
+        console.log('todo...')
+      }catch(err){
+        console.log(err)
+      }
+    }
+  }
+}
+</script>

+ 189 - 0
src/views/platformService/settlement/components/invoiceManagement/xlsxUploadModal.vue

@@ -0,0 +1,189 @@
+<template>
+  <el-dialog
+    center
+    width="1024px"
+    title="导入采销订单补录"
+    :visible="innerVisible"
+    :close-on-click-modal="false"
+    @close="() => innerVisible = false"
+  >
+    <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 style="width:100%;display:flex;justify-content:flex-end;margin-top:10px">
+      <el-button size="mini" type="primary">保&nbsp存</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import companyHelper from '@/mixins/companyHelper'
+import { MessageBox } from 'element-ui'
+import dayjs from 'dayjs'
+
+import {
+  helper,
+  columns,
+  PROPERTYS,
+  getTableProperty,
+  createErrorMessage,
+  createFieldVerification,
+  requsetFields,
+  requiredFields,
+} from './_t'
+
+export default {
+  mixins: [companyHelper],
+  props: ['visible'],
+  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: {
+    validateTableHeader(header, importHeader) {
+      let isHeaderOk = true
+      if (header.length !== importHeader.length) return false
+      for (const index in header) {
+        const field = header[index]
+        const importField = importHeader[index]
+        if (field !== importField) {
+          console.log(field, importField)
+          isHeaderOk = false
+          break
+        }
+      }
+
+      return isHeaderOk
+    },
+    validateRequiredField(requiredFields) {
+        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() !== '')) {
+          verification.isValid = false
+          verification.notValidRows.push(index + 1)
+        }
+      })
+      return verification
+    },
+    /* 处理不合法的值,提示错误信息,并返回最终的验证状态 **/
+    handleNotValidFields(...validStates) {
+      const messages = {}
+      let isFinalValid = true
+
+      for (const validState of validStates) {
+        const { message, isValid, notValidRows } = validState
+        if (isValid) continue
+        isFinalValid = false
+
+        notValidRows.forEach(row => {
+          if (!messages[row]) messages[row] = []
+          messages[row].push(message)
+        })
+      }
+
+      return {
+        isFinalValid,
+        message: () => !isFinalValid && MessageBox({
+          type: 'warning',
+          title: '数据填写错误',
+          dangerouslyUseHTMLString: true,
+          message: createErrorMessage(messages),
+          customClass: 'error-message__wrapper'
+        })
+      }
+    },
+    /* 校验导入的数据 **/
+    validateFields(tableData = []) {
+      const mapTableFieldToTableData = {}
+      for (const tableItem of tableData) {
+        const propertys = Object.keys(tableItem)
+        for (const property of propertys) {
+          const value = tableItem[property]
+          if (!mapTableFieldToTableData[property]) mapTableFieldToTableData[property] = []
+          mapTableFieldToTableData[property].push(value)
+        }
+      }
+
+      return this.handleNotValidFields(
+        this.validateRequiredField(helper.write(mapTableFieldToTableData, requiredFields))
+      )
+    },
+    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).message()
+    },
+    async onSubmit() {
+      const { message, isFinalValid } = this.validateFields(this.tableData)
+      if (!isFinalValid) return message()
+
+      const list = this.tableData.map(tableItem => requsetFields.reduce((prev, currentKey) => ({
+        ...prev,
+        [currentKey]: currentKey === PROPERTYS.SEND_TIME ? dayjs(tableItem[currentKey] * 1000).format('YYYY-MM-DD HH:mm:ss') : tableItem[currentKey]
+      }), {}))
+
+      this.loading = true
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.error-message__wrapper{
+  width: 1024px;
+}
+</style>

+ 67 - 0
src/views/platformService/settlement/components/waitAuditCredentials.vue

@@ -0,0 +1,67 @@
+<template>
+  <el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-position="left" size="mini" label-width="80px">
+    <el-form-item label="审核状态" :prop="approve.status">
+      <el-select style="width:400px" v-model="ruleForm[approve.status]">
+        <el-option v-for="status in statusList" :key="status.value" :value="status.value" :label="status.label" />
+      </el-select>
+    </el-form-item>
+
+    <el-form-item label="审核备注" :prop="approve.remark">
+      <el-input style="width:400px" type="textarea" v-model="ruleForm[approve.remark]" />
+    </el-form-item>
+
+    <el-form-item style="display:flex;justify-content:flex-end;width:470px">
+       <el-button type="primary" size="mini" @click="onSubmit">保存</el-button>
+    </el-form-item>
+  </el-form>
+</template>
+
+<script>
+import { mapPropertys } from '../_static'
+export default {
+  name:'WaitAuditCredentiials',
+  data(){
+      return {
+          statusList:[
+            {label:'通过',value:"1"},
+            {label:'驳回',value:"0" }
+          ],
+          approve:mapPropertys.approve,
+          ruleForm:{
+            [mapPropertys.approve.status]:"0",
+            [mapPropertys.approve.remark]:""
+          }
+      }
+  },
+  computed:{
+    rules(){
+      return ({
+        [mapPropertys.approve.status]:[
+          {
+            required:true,
+            trigger:'change',
+            message:'请选择审核状态'
+          }
+        ],
+        [mapPropertys.approve.remark]:[
+          {
+            required:this.ruleForm[mapPropertys.approve.status] === "0",
+            trigger:'change',
+            message:'请输入备注'
+          }
+        ]
+      })
+    }
+  },
+  methods:{
+    async onSubmit(){
+      try {
+        await this.$refs.ruleForm.validate()
+        console.log('todo')
+      }catch(err){
+        console.log(err)
+      }
+    }
+  }
+}
+</script>

+ 187 - 0
src/views/platformService/settlement/components/waitUploadCredentials.vue

@@ -0,0 +1,187 @@
+<template>
+  <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-position="left" size="mini">
+    <el-form-item label="凭证图片" :prop="approve.certificateImage" style="display:flex">
+      <div class="good_info_img_div">
+        <ul v-if="ruleForm[approve.certificateImage]" class="clear">
+          <li
+            class="img-show-li"
+            v-viewer
+            v-for="(img, iindex) in ruleForm[approve.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, approve.certificateImage)"
+              ></i>
+            </div>
+          </li>
+          <li
+            class="img-show-li"
+            v-if="ruleForm[approve.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, approve.certificateImage)"
+                  @UploadSuccessEvent="
+                    UploadSuccessEvent($event, approve.certificateImage)
+                  "
+                ></file-upload>
+              </div>
+            </div>
+          </li>
+        </ul>
+      </div>
+    </el-form-item>
+
+    <el-form-item style="display:flex;justify-content:flex-end;width:470px">
+       <el-button type="primary" size="mini" @click="onSubmit">保存</el-button>
+    </el-form-item>
+  </el-form>
+</template>
+
+<script>
+import { mapPropertys } from "./../_static"
+export default {
+    data(){
+        return {
+            approve:mapPropertys.approve,
+            ruleForm:{
+                [mapPropertys.approve.certificateImage]:[]
+            },
+            rules:{
+              [mapPropertys.approve.certificateImage]:[
+                {
+                  required:true,
+                  message:'请上传凭证图片',
+                  trigger:'change'
+                }
+              ]
+            }
+        }
+    },
+    methods:{
+      beforeAvatarUpload(file) {
+        let isJPG = false;
+        if (
+          file.type === "image/jpg" ||
+          file.type === "image/png" ||
+          file.type === "image/jpeg"
+          ) {
+            isJPG = true;
+          }
+          const isLt2M = file.size / 1024 / 1024 < 1;
+          if (!isJPG) {
+            this.$message.error("图片格式不正确!");
+          }
+          if (!isLt2M) {
+          this.$message.error("图片大小不能超过 1MB!");
+         }
+          return isJPG && isLt2M;
+        },
+        closeImg(index, key) {
+            this.ruleForm[key].splice(index, 1);
+            this.$refs.ruleForm.validateField(key);
+        },
+        async UploadSuccessEvent(data, key) {
+          const { url } = data;
+          if (url === "noToken") {
+            await this.logout();
+          } else {
+            if (key === "good_thumb_img") {
+              this.ruleForm[key] = url;
+            } else {
+              if (this.ruleForm[key].length < 10) {
+                this.ruleForm[key].push(url);
+              }
+            }
+            this.$refs.ruleForm.validateField(key);
+            this.$message.success("图片上传成功!");
+          }
+        },
+        UploadErrorEvent(res, key) {
+            if (res !== "break") {
+                this.$message.error("图片上传失败!");
+                this.$refs.ruleForm.validateField(key);
+            }
+        },
+        UploadErrorEvent(res, key) {
+            if (res !== "break") {
+                this.$message.error("图片上传失败!");
+                this.$refs.ruleForm.validateField(key);
+            }
+        },
+        async onSubmit(){
+          try {
+            await this.$refs.ruleForm.validate()
+            console.log('todo...')
+          }catch(err){
+            console.log(err)
+          }
+      }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+  // position: relative;
+  .good_info_img_div {
+    ul {
+      width: 100%;
+      li {
+        float: left;
+        width: 55px;
+        height: 55px;
+        padding: 0 5px 0 0;
+        .img-show-li-div {
+          width: 50px;
+          height: 50px;
+          border: 1px solid #dfe4ed;
+          background: #dfe4ed;
+          position: relative;
+          img.img-show {
+            width: 100%;
+            height: 100%;
+            position: relative;
+            display: inline-block;
+          }
+          i.el-icon-close {
+            position: absolute;
+            z-index: 2;
+            top: 0;
+            right: 0;
+            color: #dfe4ed;
+          }
+          &:hover {
+            i.el-icon-close {
+              cursor: pointer;
+              color: #6954f0;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  .goodsCostAdd-title {
+    border-top: 1px solid #ebeef5;
+    span {
+      height: 50px;
+      line-height: 50px;
+      font-family: "微软雅黑", sans-serif;
+      font-weight: 400;
+      font-style: normal;
+      font-size: 16fpx;
+      text-align: left;
+    }
+  }
+</style>
+

+ 88 - 0
src/views/platformService/settlement/components/waitUploadRequirement.vue

@@ -0,0 +1,88 @@
+<template>
+  <el-form ref="ruleForm" :rules="rules" :model="ruleForm" label-position="left" label-width="80px" size="mini">
+    <ul style="display:flex">
+      <li style="width:500px">
+        <el-form-item label="发票抬头" :prop="approve.invoiceTitle">
+          <el-input v-model="ruleForm[approve.invoiceTitle]" style="width:400px" />
+        </el-form-item>
+
+        <show-data-table 
+          :sitem="{}"
+          style="padding: -5px 0 10px 0"
+          :newTime="newTime"
+          :columns="invoiceColumns"
+        />
+      </li>
+
+      <li style="500px">
+        <el-form-item label="发票类型" :prop="approve.invoiceType">
+          <el-select v-model="ruleForm[approve.invoiceType]" style="width:400px" placeholder="发票类型">
+            <el-option />
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="备注" :prop="approve.remark">
+          <el-input  v-model="ruleForm[approve.remark]" style="width:400px" type="textarea" />
+        </el-form-item>
+      </li>
+    </ul>
+
+    <div style="width:980px;display:flex;justify-content:flex-end;margin-bottom:10px">
+      <el-button size="mini" type="primary" @click="onSubmit">保存</el-button>
+    </div>
+    
+  </el-form>
+</template>
+
+<script>
+import { invoiceColumns } from "./../columns"
+import { mapPropertys } from "./../_static"
+export default {
+  name:'WaitAuditCredentiials',
+  data(){
+      return {
+          approve:mapPropertys.approve,
+          invoiceColumns,
+          newTime:"",
+          ruleForm:{
+            [mapPropertys.approve.invoiceTitle]:'',
+            [mapPropertys.approve.invoiceType]:"",
+            [mapPropertys.approve.remark]:""
+          },
+          rules:{
+            [mapPropertys.approve.invoiceTitle]:[
+              {
+                required:true,
+                trigger:'change',
+                message:'请输入发票抬头'
+              }
+            ],
+            [mapPropertys.approve.invoiceType]:[
+              {
+                required:true,
+                trigger:'change',
+                message:'请选择发票类型'
+              }
+            ],
+            [mapPropertys.approve.remark]:[
+              {
+                required:true,
+                trigger:'change',
+                message:'请输入发票备注'
+              }
+            ]
+          }
+      }
+  },
+  methods:{
+    async onSubmit(){
+      try {
+        await this.$refs.ruleForm.validate()
+        console.log('todo')
+      }catch(err){
+        console.log(err)
+      }
+    }
+  }
+}
+</script>

+ 34 - 130
src/views/platformService/settlement/detail.vue

@@ -2,9 +2,9 @@
   <div class="bargainListDetail">
     <div class="bargainListDetail-main" v-if="powers.some((i) => i == '007')">
       <el-tabs v-model="projectTabs" v-loading="loading">
-        <el-tab-pane label="议价单详情" name="1">
+        <el-tab-pane label="平台订单详情" name="1">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
-            <el-collapse-item :title="'议价详情'" name="1">
+            <el-collapse-item :title="'平台订单详情'" name="1">
               <show-data-table
                 style="padding: -5px 0 10px 0"
                 :newTime="newTime"
@@ -25,109 +25,34 @@
                     "
                   ></el-tag>
                 </template>
-
-                <template slot="is_addrs">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (options12.find((item) => item.id == sitem.is_addrs) || {}).name ||
-                      '--'
-                    "
-                  ></el-tag>
-                </template>
-                <template slot="is_custom">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (options1.find((item) => item.id == sitem.is_custom) || {}).name ||
-                      '--'
-                    "
-                  ></el-tag>
-                </template>
-
-                <template slot="good_num">
-                  <span>{{ sitem.good_num ? sitem.good_num : "0" }}{{ sitem.unit }}</span>
-                </template>
-                <template slot="rate_status">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (
-                        rate_status_options.find(
-                          (item) => item.id == sitem.rate_status + ''
-                        ) || {}
-                      ).label || '--'
-                    "
-                  ></el-tag>
-                </template>
               </show-data-table>
             </el-collapse-item>
-            <el-collapse-item title="商品信息" name="20">
-              <show-goods-data-table
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :type="'3'"
-                :skucode="''"
-                :spucode="sitem.spuCode"
-                :iscgd="true"
-              />
-            </el-collapse-item>
-            <el-collapse-item
-              title="商品成本信息"
-              name="6"
-              v-if="isDisplayPrivateField('1')"
-            >
+            <el-collapse-item title="需求订单详情" name="2">
               <show-data-table
+                style="padding: -5px 0 10px 0"
                 :newTime="newTime"
                 v-if="newTime !== ''"
                 :sitem="sitem"
-                :columns="costArr"
-              >
-              </show-data-table>
+                :columns="demandOrderColumns"
+              />
             </el-collapse-item>
-            <el-collapse-item
-              title="商品毛利信息"
-              name="7"
-              v-if="isDisplayPrivateField('3')"
-            >
-              <show-data-table
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :sitem="sitem"
-                :columns="bargainingArr"
-              >
-              </show-data-table>
+
+            <el-collapse-item title="待供应商上传凭证" name="3">
+              <wait-upload-credentials />
             </el-collapse-item>
-            <el-collapse-item
-              title="业务部门审批"
-              name="2"
-              v-if="
-                (eaxmList.some((item) => item.info_status + '' == '0') ||
-                  (status == '0' && ppowers.some((i) => i == '0'))) &&
-                !isSupertube
-              "
-            >
-              <exam-formss
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :disabled="!(status == '0' && ppowers.some((i) => i == '0'))"
-                :sitem="orderItem"
-                @searchChange="examFormSubmit($event, '业务主管')"
-              />
+
+            <el-collapse-item title="待供应商上传发票要求" name="4">
+              <wait-audit-credentials />
+            </el-collapse-item>
+
+            <el-collapse-item title="待供应商上传发票要求" name="5">
+              <wait-upload-requirement />
             </el-collapse-item>
-          </el-collapse>
-        </el-tab-pane>
-        <el-tab-pane label="审批记录" name="3">
-          <process-time-line
-            v-if="newTime !== ''"
-            :newTime="newTime"
-            :type="'YJD'"
-            :orderCode="queryId"
-          />
-        </el-tab-pane>
 
-        <el-tab-pane label="流程图" name="5">
-          <flow-chart process_id="13" :orderCode="queryId" />
+            <el-collapse-item title="发票管理" name="6">
+              <invoice-management />
+            </el-collapse-item>
+          </el-collapse>
         </el-tab-pane>
       </el-tabs>
     </div>
@@ -138,41 +63,34 @@
 </template>
 <script>
 import examFormss from "./exam-form.vue";
-import asyncRequest from "@/apis/service/sellOut/bargainList";
+import asyncRequest from "@/apis/service/platformService/settlement";
+import WaitUploadCredentials from "./components/waitUploadCredentials.vue"
+import WaitAuditCredentials from "./components/waitAuditCredentials.vue"
+import WaitUploadRequirement from "./components/waitUploadRequirement.vue"
+import InvoiceManagement from "./components/invoiceManagement/index.vue"
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 
 import {
   editColumns,
-  costArr,
-  bargainingArr,
-  options1,
-  options2,
-  options3,
-  options4,
-  options5,
-  options6,
-  options7,
-  options8,
-  options9,
-  options10,
-  options11,
-  options12,
   statusList,
-  rate_status_options,
+  demandOrderColumns
 } from "./columns";
-import privateField from '../../../mixins/privateField';
 export default {
   components: {
     examFormss,
+    WaitUploadCredentials,
+    WaitAuditCredentials,
+    WaitUploadRequirement,
+    InvoiceManagement
   },
-  name: "bargainListDetail",
-  mixins: [resToken,privateField],
+  name: "settlementDetail",
+  mixins: [resToken],
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field", "isSupertube"]),
     powers() {
       const { btnList } = this.$store.getters;
-      const tran = btnList.find((item) => item.menu_route == "bargainListDetail") || {};
+      const tran = btnList.find((item) => item.menu_route == "settlementDetail") || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
@@ -188,23 +106,9 @@ export default {
     return {
       size: "small",
       eaxmList: [],
-      costArr,
-      bargainingArr,
       editColumns,
-      options1,
-      options2,
-      options3,
-      options4,
-      options5,
-      options6,
-      options7,
-      options8,
-      options9,
-      options10,
-      options11,
-      options12,
+      demandOrderColumns,
       statusList,
-      rate_status_options,
       projectTabs: "1",
       activeNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "20"],
       newTime: "",

+ 65 - 74
src/views/platformService/settlement/index.vue

@@ -26,12 +26,22 @@
         <template #table-header="{}">
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
-              <el-col :span="4" style="width: 130px">
+               <el-col :span="4" style="width: 301px; padding: 0 10px 0 0">
+                <period-date-picker
+                  :start="parmValue[mapPropertys.search.createStart]"
+                  :end="parmValue[mapPropertys.search.createEnd]"
+                  :width="'134px'"
+                  :size="searchSize"
+                  @timeReturned="handleTime"
+                />
+              </el-col>
+
+              <el-col :span="4" style="width: 145px;margin-right:10px">
                 <el-select
                   :size="searchSize"
-                  v-model="parmValue.status"
+                  v-model="parmValue[mapPropertys.search.openStatus]"
                   clearable
-                  placeholder="状态"
+                  placeholder="开票状态"
                   @change="
                     pageInfo.curr = 1;
                     parmValue.page = 1;
@@ -47,14 +57,27 @@
                   </el-option>
                 </el-select>
               </el-col>
-              <el-col :span="4" style="width: 301px; padding: 0 0 0 10px">
-                <period-date-picker
-                  :start="parmValue.start"
-                  :end="parmValue.end"
-                  :width="'134px'"
+
+             <el-col :span="4" style="width: 145px">
+                <el-select
                   :size="searchSize"
-                  @timeReturned="handleTime"
-                />
+                  v-model="parmValue[mapPropertys.search.paymentCollectionStatus]"
+                  clearable
+                  placeholder="回款状态"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in statusList"
+                    :key="item.id"
+                    :label="item.label"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
               </el-col>
 
               <el-col :span="3" style="width: 66px; float: right">
@@ -79,57 +102,26 @@
               </el-col>
             </el-row>
 
-            <el-row>
-              <el-col :span="4" style="width: 420px;margin-top: 10px; ">
-                <el-input
-                  clearable
-                  :size="searchSize"
-                  placeholder="关键字"
-                  v-model="s_input"
-                  maxlength="40"
-                  @blur="
+            <el-row style="margin-top: 10px;">
+
+              <el-col :span="3" style="margin-right:10px">
+                 <el-input size="mini" v-model="parmValue[mapPropertys.search.demandOrderNo]" placeholder="需求订单编号" clearable   @change="
                     pageInfo.curr = 1;
                     parmValue.page = 1;
                     searchList();
-                  "
-                  class="input-with-select"
-                >
-                  <el-select
-                    style="width: 140px"
-                    v-model="select"
-                    slot="prepend"
-                    placeholder="关键字类型"
-                  >
-                    <el-option label="议价单编号" value="1" />
-                    <el-option label="反馈商品编号" value="2" />
-                    <el-option label="竞价单编号" value="3" />
-                    <el-option label="申请人部门" value="4" />
+                  "/>
+              </el-col>
 
-                  </el-select>
-                  <el-button
-                    slot="append"
-                    icon="el-icon-search"
-                    @click="
-                      pageInfo.curr = 1;
-                      parmValue.page = 1;
-                      searchList();
-                    "
-                  ></el-button>
-                </el-input>
+              <el-col :span="3">
+                 <el-input size="mini" v-model="parmValue[mapPropertys.search.platformNo]" placeholder="平台结算编号" clearable   @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "/>
               </el-col>
             </el-row>
 
             <el-row>
-              <el-col :span="4" style="width: 380px;margin-top: 10px;">
-                <search-customer
-                  :value="parmValue.customer_code"
-                  :size="searchSize"
-                  :placeholder="'企业客户'"
-                  @searchChange="customerChange"
-                  :names="parmValue.supplierName"
-                  :is-detail="true"
-                />
-              </el-col>
             </el-row>
           </div>
         </template>
@@ -172,7 +164,7 @@
             <i
               class="el-icon-view tb-icon"
               
-               @click="getRouter('bargainListDetail', scope.row.bargainNo )"
+               @click="getRouter('settlementDetail', scope.row.bargainNo )"
             ></i>
           </el-tooltip>
         </template>
@@ -186,20 +178,21 @@
 <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
-import asyncRequest from "@/apis/service/sellOut/bargainList";
+import asyncRequest from "@/apis/service/platformService/settlement";
+import { mapPropertys } from "./_static"
 import companyHelper from "@/mixins/companyHelper"
 import { listCol, statusList } from "./columns";
 import { mapGetters } from "vuex";
 
 export default {
-  name: "bargainList",
+  name: "settlement",
   mixins: [mixinPage, resToken, companyHelper],
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       const tran =
         this.$store.getters.btnList.find(
-          (item) => item.menu_route == "bargainList"
+          (item) => item.menu_route == "settlement"
         ) || {};
       const { action } = tran ?? {};
       return action ?? [];
@@ -207,6 +200,7 @@ export default {
   },
   data() {
     return {
+      mapPropertys,
       select: "1",
       s_input: "",
       customerCode: [], //客户公司code
@@ -218,18 +212,15 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
-        supplierName: "",
-        customer_code: "",
-        bidsNo: "", // 反馈编号
-        infoNo: "", // 竞价单编号
-        status: "", // 状态
-        bargainNo: "", //议价编号
-        status: "", //售后申请单处理状态
+        回款状态属性:"",
+        开票状态属性:"",
+        供应商属性:"",
+        需求订单编号属性:"",
+        平台结算编号属性:"",
         start: "",
         end: "",
         page: 1, // 页码
         size: 15, // 每页显示条数
-        company_name:"",
       },
       // 表格 - 数据
       tableData: [],
@@ -310,15 +301,15 @@ export default {
       this.select = "1";
       this.s_input = "";
       this.parmValue = {
-        bidsNo: "", // 反馈编号
-        infoNo: "", // 竞价单编号
-        bargainNo: "", //议价编号
-        status: "", // 状态
+        回款状态属性:"",
+        开票状态属性:"",
+        供应商属性:"",
+        需求订单编号属性:"",
+        平台结算编号属性:"",
         start: "",
         end: "",
         page: 1, // 页码
         size: 15, // 每页显示条数
-        company_name:"",
       };
       // 表格 - 分页
       this.pageInfo = {
@@ -431,14 +422,14 @@ export default {
     // 时间选择事件
     async handleTime(e) {
       if (e.startTime !== "") {
-        this.parmValue.start = e.startTime;
+        this.parmValue[mapPropertys.search.createStart] = e.startTime;
       } else {
-        this.parmValue.start = "";
+        this.parmValue[mapPropertys.search.createStart] = "";
       }
       if (e.endTime !== "") {
-        this.parmValue.end = e.endTime;
+        this.parmValue[mapPropertys.search.createEnd]= e.endTime;
       } else {
-        this.parmValue.end = "";
+        this.parmValue[mapPropertys.search.createEnd] = "";
       }
       if (this.parmValue.start !== "" && this.parmValue.end !== "") {
         this.pageInfo.curr = 1;

+ 0 - 535
src/views/serviceParam/supplier/components/addEdit.vue

@@ -1,535 +0,0 @@
-<template>
-  <el-dialog
-    v-loading="loading"
-    :title="title"
-    :center="true"
-    align="left"
-    top="8vh"
-    width="1040px"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-    @close="showModelThis = false"
-  >
-    <el-card style="margin-top: -20px">
-      <el-row>
-        <el-col :span="24">
-          <el-form
-            ref="ruleForm"
-            :model="ruleForm"
-            size="mini"
-            :rules="rulesThis"
-            label-width="90px"
-            class="demo-ruleForm"
-          >
-            <el-row>
-              <el-col :span="1" style="padding: 20px 0 0 0">
-                <ul class="tc fff">
-                  <li>企</li>
-                  <li>业</li>
-                  <li>信</li>
-                  <li>息</li>
-                </ul>
-              </el-col>
-              <el-col :span="23" style="border-left: 1px solid #dcdfe6">
-                <el-row>
-                  <el-col :span="4">
-                    <el-form-item label="法人" required>
-                      {{ ruleForm.inv_legaler }}</el-form-item></el-col>
-                  <el-col :span="4">
-                    <el-form-item
-                      label="营业执照"
-                      prop="license_img"
-                      class="activity-upload"
-                    >
-                      <div
-                        class="btnupload"
-                        style="position: relative; width: 28px; height: 28px"
-                      >
-                        <img
-                          v-if="ruleForm.license_img"
-                          v-viewer
-                          :src="ruleForm.license_img"
-                          class="avatar"
-                        >
-                      </div>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="16">
-                    <el-form-item label="企业名称" required>
-                      {{ ruleForm.company }}
-                    </el-form-item>
-                  </el-col>
-
-                  <el-col :span="24">
-                    <el-row>
-                      <el-col
-                        :span="8"
-                      ><el-form-item
-                        label="纳税识别号"
-                        required
-                        label-width="100px"
-                        style="width: 100%"
-                      >
-                        {{ ruleForm.inv_code }}
-                      </el-form-item>
-                      </el-col>
-                      <el-col :span="7">
-                        <el-form-item label="成立日期" required>
-                          {{ ruleForm.inv_time }}
-                        </el-form-item>
-                      </el-col>
-
-                      <el-col :span="9">
-                        <el-form-item label="公司类型" required>
-                          {{ ruleForm.type }}</el-form-item></el-col>
-                    </el-row>
-                  </el-col>
-
-                  <el-col :span="18">
-                    <el-form-item label="详细地址" required>
-                      {{ ruleForm.addr }}
-                    </el-form-item>
-                  </el-col>
-                  <el-col :span="6">
-                    <el-form-item label="联系人" required>
-                      {{ ruleForm.contactor }}
-                    </el-form-item></el-col>
-
-                  <el-col :span="24">
-                    <el-form-item label="营业范围" required>
-                      {{ ruleForm.inv_scope }}
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-col>
-            </el-row>
-
-            <el-row style="border-top: 1px solid #dcdfe6">
-              <el-col :span="1" style="padding: 20px 0 0 0">
-                <ul class="tc sss">
-                  <li>开</li>
-                  <li>票</li>
-                  <li>信</li>
-                  <li>息</li>
-                </ul>
-              </el-col>
-              <el-col
-                :span="23"
-                style="padding: 20px 0 0 0; border-left: 1px solid #dcdfe6"
-              >
-                <el-row>
-                  <el-col :span="13">
-                    <el-form-item size="medium" label="公司抬头" prop="invoice_title">
-                      <el-input
-                        v-model="ruleForm.invoice_title"
-                        placeholder="公司抬头"
-                        :disabled="isDetail == '007'"
-                        maxlength="100"
-                      />
-                    </el-form-item>
-
-                    <el-form-item size="medium" label="银行名称" prop="inv_bank">
-                      <el-input
-                        v-model="ruleForm.inv_bank"
-                        placeholder="银行名称"
-                        :disabled="isDetail == '007'"
-                        maxlength="100"
-                      />
-                    </el-form-item>
-                  </el-col>
-
-                  <el-col :span="11">
-                    <el-form-item size="medium" label="联系电话" prop="invoice_mobile">
-                      <el-input
-                        v-model="ruleForm.invoice_mobile"
-                        placeholder="联系电话"
-                        maxlength="100"
-                        :disabled="isDetail == '007'"
-                      >
-                        <el-select slot="prepend" v-model="currentMobileMode" style="width:120px">
-                          <el-option v-for="opt in options" :key="opt.value" :label="opt.label" :value="opt.value" />
-                        </el-select>
-                      </el-input>
-                    </el-form-item>
-
-                    <el-form-item size="medium" label="银行卡号" prop="inv_bankNo">
-                      <el-input
-                        v-model="ruleForm.inv_bankNo"
-                        placeholder="银行卡号"
-                        maxlength="100"
-                        :disabled="isDetail == '007'"
-                      />
-                    </el-form-item>
-                  </el-col>
-
-                  <el-col :span="24">
-                    <el-form-item size="medium" label="联系地址" prop="inv_addr">
-                      <el-input
-                        v-model="ruleForm.inv_addr"
-                        placeholder="联系地址"
-                        maxlength="100"
-                        :disabled="isDetail == '007'"
-                      />
-                    </el-form-item>
-                  </el-col>
-
-                  <div style="width: 100%; text-align: right">
-                    <el-button
-                      v-if="isDetail !== '007'"
-                      type="primary"
-                      :size="'small'"
-                      @click="submitForm"
-                    >保 存
-                    </el-button>
-                    <el-button :size="'small'" @click="showModelThis = false">{{
-                      isDetail == "007" ? "关 闭" : "取 消"
-                    }}</el-button>
-                  </div>
-                </el-row>
-              </el-col>
-            </el-row>
-          </el-form>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-<script>
-import asyncRequest from '@/apis/service/serviceParam/supplier'
-import resToken from '@/mixins/resToken'
-import { isMobile, isPhone, invTime, isqz, isqzf, iszf, isz } from '@/utils/validate'
-
-export default {
-  name: 'WorkCompany',
-  mixins: [resToken],
-  props: ['showModel', 'id', 'sitem', 'isDetail'],
-  data() {
-    const validatemobile = (rule, value, callback) => {
-      if (value !== '') {
-        if (isPhone(value) || isMobile(value)) {
-          callback()
-        } else {
-          callback(new Error('联系电话格式不正确!'))
-        }
-      } else {
-        callback(new Error('联系电话不能为空!'))
-      }
-    }
-
-    const basicRule = { required: true, trigger: 'blur' }
-
-    return {
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() >= Date.now()
-        }
-      },
-      supplier_name: '',
-      accountNames: '',
-      loading: false,
-      title: '供应商升级业务企业',
-      showModelThis: this.showModel,
-      currentMobileMode: '0',
-      ruleForm: {
-        id: '',
-        code: '',
-        company: '', // 公司名称
-        type: '', //	公司类型
-        inv_code: '', //	纳税识别号
-        inv_legaler: '', //	法人
-        inv_time: '', // 注册日期
-        inv_addr: '', // 注册地址
-        inv_bank: '', //	银行
-        inv_bankNo: '', //	银行账户
-        contactor: '', //		联系人
-        invoice_mobile: '', //	联系人电话
-        addr: '', //		联系地址
-        inv_scope: '', //	经营范围
-        license_img: '', //	营业执照
-        invoice_title: ''
-      },
-      rulesThis: this.rules,
-      options: [
-        {
-          value: '0',
-          label: '区-固-分',
-          rule: {
-            ...basicRule,
-            validator(rule, value, callback) {
-              if (!value) {
-                return callback(new Error('联系电话不能为空!'))
-              }
-
-              if (!isqzf(value)) {
-                callback(new Error('联系电话格式不正确!'))
-              } else {
-                callback()
-              }
-            }
-          }
-        },
-        {
-          value: '1',
-          label: '区-固',
-          rule: {
-            ...basicRule,
-            validator(rule, value, callback) {
-              if (!value) {
-                return callback(new Error('联系电话不能为空!'))
-              }
-
-              if (!isqz(value)) {
-                callback(new Error('联系电话格式不正确!'))
-              } else {
-                callback()
-              }
-            }
-          }
-        },
-        {
-          value: '2',
-          label: '固-分',
-          rule: {
-            ...basicRule,
-            validator(rule, value, callback) {
-              if (!value) {
-                return callback(new Error('联系电话不能为空!'))
-              }
-
-              if (!iszf(value)) {
-                callback(new Error('联系电话格式不正确!'))
-              } else {
-                callback()
-              }
-            }
-          }
-        },
-        {
-          value: '3',
-          label: '固',
-          rule: {
-            ...basicRule,
-            validator(rule, value, callback) {
-              if (!value) {
-                return callback(new Error('联系电话不能为空!'))
-              }
-
-              if (!isz(value)) {
-                callback(new Error('联系电话格式不正确!'))
-              } else {
-                callback()
-              }
-            }
-          }
-        },
-        {
-          value: '4',
-          label: '手机号',
-          rule: {
-            ...basicRule,
-            validator(rule, value, callback) {
-              if (!value) {
-                return callback(new Error('联系电话不能为空!'))
-              }
-
-              if (!isMobile(value)) {
-                callback(new Error('联系电话格式不正确!'))
-              } else {
-                callback()
-              }
-            }
-          }
-        }
-      ],
-      rules: {
-        inv_bank: [
-          {
-            required: true,
-            message: '银行名称不能为空!',
-            trigger: 'blur'
-          }
-        ],
-        inv_bankNo: [
-          {
-            required: true,
-            message: '银行卡号不能为空!',
-            trigger: 'blur'
-          }
-        ],
-
-        invoice_mobile: [{
-          ...basicRule,
-          validator(rule, value, callback) {
-            if (!value) {
-              return callback(new Error('联系电话不能为空!'))
-            }
-
-            if (!isqzf(value)) {
-              callback(new Error('联系电话格式不正确!'))
-            } else {
-              callback()
-            }
-          }
-        }],
-
-        inv_addr: [{ required: true, message: '联系地址不能为空!', trigger: 'blur' }],
-        invoice_title: [{ required: true, message: '公司抬头不能为空', trigger: 'blur' }]
-      }
-    }
-  },
-  watch: {
-    showModel: function(val) {
-      this.showModelThis = val
-      if (val) {
-        this.initForm()
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit('cancel')
-      }
-    },
-    currentMobileMode() {
-      this.$set(this.rulesThis.invoice_mobile, '0', this.options[this.currentMobileMode].rule)
-    }
-  },
-  methods: {
-    async initForm() {
-      this.supplier_name = ''
-      this.loading = true
-      this.rulesThis = this.rules
-      await this.resetForm()
-      await this.initData()
-      this.loading = false
-    },
-
-    async initData() {
-      const { code } = this.sitem
-      const res = await asyncRequest.detail({ code })
-      if (res && res.code === 0 && res.data) {
-        const {
-          id,
-          name, // 公司名称
-          nature, //	公司类型
-          registercode, //	纳税识别号
-          legaler, //	法人
-          registertime, // 注册日期
-          contactor, //		联系人
-          addr, //		联系地址
-          scope, //	经营范围
-          license_img //	营业执照
-        } = res.data
-        // console.log(invTime(registertime));
-        this.ruleForm = {
-          id: id || '',
-          code,
-          company: name || '', // 公司名称
-          type: nature || '', //	公司类型
-          inv_code: registercode || '', //	纳税识别号
-          inv_legaler: legaler || '', //	法人
-          inv_time: invTime(registertime) || '', // 注册日期
-          inv_addr: '', // 注册地址
-          inv_bank: '', //	银行
-          inv_bankNo: '', //	银行账户
-          contactor: contactor || '', //		联系人
-          invoice_mobile: '', //	联系人电话
-          addr: addr || '', //		联系地址
-          inv_scope: scope || '', //	经营范围
-          license_img: license_img || '' //	营业执照
-        }
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout()
-      } else {
-        this.$message.warning(res.message)
-      }
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields()
-          this.$refs.ruleForm.clearValidate()
-          this.ruleForm = {
-            id: '',
-            code: '',
-            company: '', // 公司名称
-            type: '', //	公司类型
-            inv_code: '', //	纳税识别号
-            inv_legaler: '', //	法人
-            inv_time: '', // 注册日期
-            inv_addr: '', // 注册地址
-            inv_bank: '', //	银行
-            inv_bankNo: '', //	银行账户
-            contactor: '', //		联系人
-            invoice_mobile: '', //	联系人电话
-            addr: '', //		联系地址
-            inv_scope: '', //	经营范围
-            license_img: '' //	营业执照
-          }
-        }
-      })
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async(valid) => {
-        if (valid) {
-          if (this.loading) {
-            return
-          }
-          this.loading = true
-          const { code, inv_bank, inv_bankNo, inv_addr, invoice_mobile, invoice_title } = this.ruleForm
-
-          const model = {
-            code,
-            inv_bank,
-            inv_bankNo,
-            inv_addr,
-            invoice_mobile,
-            invoice_title
-          }
-
-          const res = await asyncRequest.inv_update(model)
-          this.loading = false
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: '升级成功',
-              message: ''
-            })
-            this.showModelThis = false
-            // 刷新
-            this.$emit('refresh')
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout()
-          } else {
-            this.$message.warning(res.message)
-          }
-        } else {
-          console.log('error submit!!')
-          return false
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.workCompany {
-  .fff,
-  .sss {
-    // border-right: 1px solid #DCDFE6;
-    box-sizing: border-box;
-    li {
-      line-height: 20px;
-      font-size: 16px;
-      font-weight: bold;
-      height: 20px;
-    }
-  }
-  .fff {
-    padding: 115px 0 0 0;
-  }
-}
-</style>

+ 8 - 94
src/views/serviceParam/supplier/index.vue

@@ -56,28 +56,6 @@
                 />
               </el-select>
             </el-col>
-            <el-col :span="4" style="width: 200px; padding: 0 0 0 10px">
-              <el-select
-                v-model="parmValue.ocr_status"
-                filterable
-                clearable
-                :size="searchSize"
-                placeholder="营业执照识别状态"
-                style="width: 100%"
-                @change="
-                  pageInfo.curr = 1;
-                  parmValue.page = 1;
-                  searchList();
-                "
-              >
-                <el-option
-                  v-for="item in ocr_status"
-                  :key="'ocr_status' + item.id"
-                  :label="item.label"
-                  :value="item.id"
-                />
-              </el-select>
-            </el-col>
 
             <el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
               <el-button type="primary" :size="searchSize" @click="searchList">
@@ -117,32 +95,6 @@
                 placeholder="创建人"
               ></el-input>
             </el-col>
-            <el-col :span="4" style="width: 170px; padding: 0 0 0 10px">
-              <el-input
-                :size="searchSize"
-                v-model="parmValue.company_name"
-                :maxlength="40"
-                @change="
-                  pageInfo.curr = 1;
-                  parmValue.page = 1;
-                  searchList();
-                "
-                placeholder="创建人部门"
-              ></el-input>
-            </el-col>
-            <el-col :span="4" style="width: 120px; padding: 0 0 0 10px">
-              <el-input
-                :size="searchSize"
-                v-model="parmValue.person"
-                :maxlength="40"
-                @change="
-                  pageInfo.curr = 1;
-                  parmValue.page = 1;
-                  searchList();
-                "
-                placeholder="负责人"
-              ></el-input>
-            </el-col>
             <el-col
               :span="3"
               class="fr"
@@ -252,25 +204,9 @@
         >
           <i class="el-icon-delete tb-icon" @click="deleteItem(scope.row.id)"></i>
         </el-tooltip>
-        <el-tooltip
-          effect="dark"
-          content="升级"
-          placement="top"
-          v-if="scope.row.is_upgrade + '' === '0'"
-        >
-          <i class="el-icon-top tb-icon" @click="openModal(scope.row)"></i>
-        </el-tooltip>
       </template>
     </ex-table>
     <no-auth v-else></no-auth>
-    <!-- 升级为业务公司-->
-    <add-edit
-      :id="modelId"
-      :show-model="showModel"
-      :sitem="modelSitem"
-      @refresh="searchList"
-      @cancel="showModel = false"
-    />
   </div>
 </template>
 <script>
@@ -279,14 +215,10 @@ import { statusList } from "@/assets/js/statusList";
 import roleLevel from "@/assets/js/roleLevel";
 import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";
-import addEdit from "./components/addEdit";
 import resToken from "@/mixins/resToken";
 export default {
   name: "supplier",
   mixins: [mixinPage, resToken],
-  components: {
-    addEdit,
-  },
   computed: {
     //组件SIZE设置
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
@@ -349,7 +281,7 @@ export default {
       columns: [
         {
           prop: "code",
-          label: "编号",
+          label: "供应商编号",
           minWidth: "160",
         },
         {
@@ -358,38 +290,20 @@ export default {
           minWidth: "200",
         },
         {
-          prop: "status",
-          label: "状态",
-          minWidth: "60",
-          _slot_: "status",
-        },
-        {
-          prop: "ocr_status",
-          label: "营业执照识别状态",
-          width: "120",
-          _slot_: "ocr_status",
+          prop: "name",
+          label: "供应商类型",
+          minWidth: "200",
         },
         {
-          prop: "is_upgrade",
-          label: "是否升级为业务公司",
-          width: "130",
-          _slot_: "is_upgrade",
+          prop: "name",
+          label: "供应商等级",
+          minWidth: "200",
         },
         {
           prop: "legaler",
-          label: "人",
+          label: "联系人",
           minWidth: "80",
         },
-        {
-          prop: "person",
-          label: "负责人",
-          minWidth: "100",
-        },
-        // {
-        //   prop: "company_name",
-        //   label: "创建人部门",
-        //   minWidth: "120px",
-        // },
         {
           prop: "creater",
           label: "创建人",

+ 13 - 0
src/views/serviceParam/supplierStore/index.vue

@@ -165,6 +165,19 @@
             @click="getRouter('supplierStoreDetail', scope.row.code)"
           ></i>
         </el-tooltip>
+
+        <el-tooltip
+          v-if="powers.some((i) => i == '007')"
+          effect="dark"
+          content="店铺装修"
+          placement="top"
+        >
+          <i
+            class="el-icon-s-open tb-icon"
+            @click="routeGoto('shopDecoration', { id: 'add', type: 'add' })"
+          ></i>
+        </el-tooltip>
+
         <el-tooltip
           v-if="powers.some((i) => i == '005')"
           effect="dark"

+ 597 - 0
src/views/serviceParam/supplierStore/shopDecoration.vue

@@ -0,0 +1,597 @@
+<template>
+  <el-form
+    ref="ruleForm"
+    v-loading="loading"
+    :model="ruleForm"
+    status-icon
+    :rules="rulesThis"
+    :size="'small'"
+    label-width="100px"
+    class="supplierAdd"
+  >
+    <!--:disabled="type !== 'add' && type !== 'edit'"-->
+    <el-row style="margin-top:10px">
+      <el-col :span="4">
+        <el-form-item label="店铺名称" prop="店铺名称属性">
+            <el-select  v-model="ruleForm['店铺名称属性']" placeholder="店铺名称">
+              <el-option />
+            </el-select>
+        </el-form-item>
+      </el-col>
+      
+      <el-col :span="4">
+        <el-form-item label="店铺风格" prop="店铺风格属性">
+          <el-checkbox-group v-model="ruleForm['店铺风格属性']">
+            <el-checkbox label="1" />
+          </el-checkbox-group>
+        </el-form-item>
+      </el-col>
+    </el-row>
+    
+    <el-row>
+      <el-col :span="24"><div class="supplierAdd-title" style="margin: 6px 0 0 10px">店铺简介</div></el-col>
+       <div style="padding:35px">
+          <el-col :span="6">
+            <el-form-item label="最近装修时间" prop="最近装修时间属性">
+              <el-date-picker style="width:100%" placeholder="最近装修时间" v-model="ruleForm['最近装修时间属性']" />
+           </el-form-item>
+         </el-col>
+          <el-col :span="6">
+            <el-form-item label="停车位数" prop="停车位数属性">
+               <el-input-number style="width:100%" placeholder="停车位数" v-model="ruleForm['停车位数属性']" />
+             </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="店铺简介" prop="店铺简介属性">
+               <el-input type="textarea" placeholder="店铺简介" v-model="ruleForm['店铺简介属性']" />
+            </el-form-item>
+          </el-col>
+     </div>
+      
+      <el-col :span="24"><div class="supplierAdd-title">曾举办活动</div></el-col>
+      <el-col :span="24">
+          <div style="padding:35px;padding-top:0px">
+            <el-table size="mini" border>
+              <el-table-column label="活动名称" />
+              <el-table-column label="操作" width="150px" />
+            </el-table>
+          </div>
+      </el-col>
+      
+      <el-col :span="24"><div class="supplierAdd-title">酒店服务设施</div></el-col>
+      <el-col :span="24">
+         <div style="padding:35px;padding-top:0px">
+            <dynamic-tags />
+         </div>
+      </el-col>
+      
+      <el-col :span="24"><div class="supplierAdd-title">餐饮设施</div></el-col>
+      <el-col :span="24">
+         <div style="padding:35px;padding-top:0px">
+            <dynamic-tags />
+         </div>
+      </el-col>
+      
+      <el-col :span="24"><div class="supplierAdd-title">客房服务设施</div></el-col>
+      <el-col :span="24">
+         <div style="padding:35px;padding-top:0px">
+            <dynamic-tags />
+         </div>
+      </el-col>
+      
+
+      <el-col :span="24"><div class="supplierAdd-title">详情图片</div></el-col>
+      <el-col :span="24">
+         <div style="padding:35px;padding-top:0px">
+            <el-table size="mini" border>
+              <el-table-column label="顺序" />
+              <el-table-column label="主图" />
+              <el-table-column label="会议室名称" />
+              <el-table-column label="面积(m²)" />
+              <el-table-column label="长度(m)" />
+              <el-table-column label="最高容纳人数(人)" />
+              <el-table-column label="参考价" />
+              <el-table-column label="操作">
+                 <template #header>
+                    <div style="display:flex;justify-content:space-between">
+                       <p>操作</p>
+                       <el-button type="text" size="mini">添加</el-button>
+                    </div>
+                </template>
+              </el-table-column>
+            </el-table>
+         </div>
+      </el-col>
+      
+      <el-col :span="24"><div class="supplierAdd-title">客房</div></el-col>
+      <el-col :span="24">
+         <div style="padding:35px;padding-top:0px">
+            <el-table size="mini" border>
+              <el-table-column label="顺序" />
+              <el-table-column label="主图" />
+              <el-table-column label="客房名称" />
+              <el-table-column label="面积(m²)" />
+              <el-table-column label="是否用窗" />
+              <el-table-column label="网络" />
+              <el-table-column label="数量(间)" />
+              <el-table-column label="参考价" />
+              <el-table-column label="操作">
+                <template #header>
+                    <div style="display:flex;justify-content:space-between">
+                       <p>操作</p>
+                       <el-button type="text" size="mini">添加</el-button>
+                    </div>
+                </template>
+              </el-table-column>
+            </el-table>
+         </div>
+      </el-col>
+      
+      <el-col :span="24"><div class="supplierAdd-title">会议服务设施</div></el-col>
+      <el-col :span="24">
+         <div style="padding:35px;padding-top:0px">
+            <el-table size="mini" border>
+              <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="操作">
+                 <template #header>
+                    <div style="display:flex;justify-content:space-between">
+                       <p>操作</p>
+                       <el-button type="text" size="mini">添加</el-button>
+                    </div>
+                </template>
+              </el-table-column>
+            </el-table>
+         </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+<script>
+import asyncRequest from '@/apis/service/serviceParam/supplierStore'
+import resToken from '@/mixins/resToken'
+import DynamicTags from "@/components/dynamic-tags"
+import {
+    isLicense,
+    isMobile,
+    isqz,
+    isSpecialSymbol,
+    hasSpace,
+    isAddr,
+    validEmail
+} from '@/utils/validate'
+
+export default {
+    name: 'SupplierAdd',
+    mixins: [resToken],
+    components:{
+      DynamicTags
+    },
+    props: ['showModel', 'id', 'type', 'sitem'],
+    data() {
+        const validateLicense = (rule, value, callback) => {
+            if (value !== '') {
+                if (!isLicense(value)) {
+                    callback(new Error('统一社会信用代码不正确!'))
+                } else {
+                    callback()
+                }
+            } else {
+                callback(new Error('请输入统一社会信用代码!'))
+            }
+        }
+        const validatemobile = (rule, value, callback) => {
+            if (value === '') {
+                callback(new Error('手机号不能为空!'))
+            } else {
+                if (!isMobile(value)) {
+                    callback(new Error('手机号格式不正确!'))
+                } else {
+                    callback()
+                }
+            }
+        }
+        const validatetelephone = (rule, value, callback) => {
+            if (value === '') {
+                callback()
+            } else {
+                if (isqz(value)) {
+                    callback()
+                } else {
+                    callback(new Error('规则为区号[0+2~3位]-固定电话[7~8位]!'))
+                }
+            }
+        }
+        const validateAddr = (rule, value, callback) => {
+            if (value === '') {
+                callback(new Error('详细地址不能为空!'))
+            } else {
+                if (hasSpace(value)) {
+                    callback(new Error('不能出现/回车/换行符!'))
+                } else if (isSpecialSymbol(value)) {
+                    callback(new Error('不能使用英文特殊字符!'))
+                } else if (isAddr(value)) {
+                    callback()
+                } else {
+                    callback(new Error('详细地址填写不规范!'))
+                }
+            }
+        }
+        const validateEmail = (rule, value, callback) => {
+            if (value === '') {
+                callback(new Error('邮箱不能为空!'))
+            } else {
+                if (!validEmail(value)) {
+                    callback(new Error('邮箱格式不正确!'))
+                } else {
+                    callback()
+                }
+            }
+        }
+        return {
+            loading: false,
+            hand_name: '',
+            coop_stateoptions: [
+                { value: '0', label: '白名单' },
+                { value: '1', label: '黑名单' }
+            ],
+            sourceoptions: [
+                { value: '0', label: '客户提供' },
+                { value: '1', label: '供应商' },
+                { value: '2', label: '公司开发' }
+            ],
+            typeoptions: [
+                { value: '0', label: '正式供应商' },
+                { value: '1', label: '临时供应商' }
+            ],
+            categoryoptions: [
+                { value: '0', label: '单品类供应商' },
+                { value: '1', label: '多品类供应商' }
+            ],
+            delivery_wayoptions: [
+                { value: '0', label: '供应商发货' },
+                { value: '1', label: '公司自提' }
+            ],
+            supplier_typeoptions: [
+                { value: '0', label: '生产厂家' },
+                { value: '1', label: '代理商' },
+                { value: '2', label: '经销商' },
+                { value: '3', label: '分销商' },
+                { value: '4', label: '电商平台' }
+            ],
+            leveloptions: [
+                { value: '2', label: '生产厂家' },
+                { value: '0', label: '一级代理商' },
+                { value: '1', label: '二级代理商' }
+            ],
+            pay_typeoptions: [
+                { value: '0', label: '现结' },
+                { value: '1', label: '月清' },
+                { value: '2', label: '双月清' }
+            ],
+            ocr_status: [
+                { id: '0', label: '未上传' },
+                { id: '1', label: '识别成功' },
+                { id: '2', label: '识别失败' }
+            ],
+            title: '添加供应商',
+            showModelThis: this.showModel,
+            pickerOptions: {
+                disabledDate(time) {
+                    return time.getTime() > Date.now()
+                }
+            },
+            ruleForm: {},
+            rulesThis: this.rules,
+            rules: {
+                coop_state: [{ required: true, message: '请选择合作状态', trigger: 'change' }],
+                source: [{ required: true, message: '请选择供应商来源', trigger: 'change' }],
+
+                type: [{ required: true, message: '请选择申请类型', trigger: 'change' }],
+                category: [{ required: true, message: '请选择所属类别', trigger: 'change' }],
+                delivery_way: [{ required: true, message: '请选择物流方式', trigger: 'change' }],
+
+                supplier_type: [
+                    { required: true, message: '请选择供应商类型', trigger: 'change' }
+                ],
+                level: [{ required: true, message: '请选择供应商级别', trigger: 'change' }],
+                pay_type: [{ required: true, message: '请选择付款方式', trigger: 'change' }],
+                prove_img: [
+                    {
+                        required: false,
+                        type: 'array',
+                        message: '请上传资质证明',
+                        trigger: 'change'
+                    }
+                ],
+                personid: [
+                    {
+                        required: true,
+                        type: 'array',
+                        message: '请选择负责人',
+                        trigger: 'change'
+                    }
+                ],
+                contactor: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
+                mobile: [{ required: true, validator: validatemobile, trigger: 'blur' }],
+                email: [{ required: true, validator: validateEmail, trigger: 'blur' }],
+                telephone: [{ required: false, validator: validatetelephone, trigger: 'blur' }],
+                position: [{ required: true, message: '职位不能为空', trigger: 'blur' }],
+                registercode: [{ required: true, validator: validateLicense, trigger: 'blur' }],
+                name: [{ required: true, message: '供应商名称不能为空', trigger: 'blur' }],
+                nature: [{ required: true, message: '公司类型不能为空', trigger: 'change' }],
+                addr: [{ required: true, validator: validateAddr, trigger: 'blur' }],
+                legaler: [{ required: true, message: '法人代表不能为空', trigger: 'blur' }],
+                registertime: [
+                    { required: true, message: '成立时间不能为空', trigger: 'change' }
+                ],
+                scope: [{ required: true, message: '营业执照不能为空', trigger: 'blur' }]
+            }
+        }
+    },
+    mounted() {
+        this.initForm()
+    },
+    methods: {
+        async initForm() {
+            this.hand_name = ''
+            this.loading = true
+            this.resetFormData()
+            this.rulesThis = this.rules
+            await this.resetForm()
+            this.loading = false
+        },
+        async resetForm() {
+            // 重置
+            await this.$nextTick(() => {
+                if (this.$refs.ruleForm) {
+                    this.$refs.ruleForm.resetFields()
+                    this.$refs.ruleForm.clearValidate()
+                    this.resetFormData()
+                }
+            })
+        },
+        resetFormData() {
+            const {
+                id, code,
+                coop_state, source,
+                type,
+                category,
+                delivery_way,
+                supplier_type,
+                level,
+                pay_type,
+                supplier_img,
+                prove_img,
+                contactor,
+                mobile,
+                position,
+                registercode,
+                name,
+                nature,
+                addr,
+                legaler,
+                registertime,
+                scope,
+                personid,
+                person,
+                telephone,
+                email
+            } = this.sitem || {}
+
+            this.hand_name = person || ''
+            this.ruleForm = {
+                id: id || '',
+                code: code || '',
+                coop_state: coop_state || '',
+                source: source || '',
+                type: type || '',
+                category: category || '',
+                delivery_way: delivery_way || '',
+                supplier_type: supplier_type || '',
+                level: level || '',
+                pay_type: pay_type || '',
+                supplier_img: supplier_img || '',
+                prove_img: prove_img ? (prove_img || '').split(',') : [],
+                contactor: contactor || '',
+                mobile: mobile || '',
+                telephone: telephone || '',
+                position: position || '',
+                registercode: registercode || '',
+                name: name || '',
+                email: email || '',
+                nature: nature || '',
+                addr: addr || '',
+                legaler: legaler || '',
+                registertime: registertime || '',
+                scope: scope || '',
+                personid: personid ? [personid] : []
+            }
+        },
+        closeImg(index) {
+            this.ruleForm.prove_img.splice(index, 1)
+            this.$refs.ruleForm.validateField('prove_img')
+        },
+        async submitForm() {
+            await this.$refs.ruleForm.validate(async(valid) => {
+                if (valid) {
+                    if (this.loading) {
+                        return
+                    }
+                    this.loading = true
+                    const model = JSON.parse(JSON.stringify(this.ruleForm))
+                    model.prove_img = model.prove_img.toString()
+                    model.personid = model.personid.toString()
+                    let res = {}
+                    if (this.id === 'add') {
+                        delete model['id']
+                        res = await asyncRequest.add(model)
+                    } else {
+                        res = await asyncRequest.update(model)
+                    }
+                    this.loading = false
+                    if (res && res.code === 0) {
+                        const title = this.id === 'add' ? '添加成功!' : '修改成功!'
+                        this.$notify.success({
+                            title,
+                            message: ''
+                        })
+                        this.showModelThis = false
+                        // 刷新
+                        this.$emit('refresh', res.data)
+                    } else if (res && res.code >= 100 && res.code <= 104) {
+                        await this.logout()
+                    } else {
+                        this.$message.warning(res.message)
+                    }
+                } else {
+                    console.log('error submit!!')
+                    return false
+                }
+            })
+        },
+        deleteimg() {
+            this.ruleForm.supplier_img = ''
+            this.$refs.ruleForm.validateField('supplier_img')
+        },
+        handleHandoverName(e) {
+            if (e && e.id) {
+                this.ruleForm.personid = [e.id]
+            } else {
+                this.ruleForm.personid = []
+            }
+            this.$refs.ruleForm.validateField('personid')
+        },
+        type_search_change(e) {
+            const { id } = e
+            this.ruleForm.nature = id || ''
+            this.$refs.ruleForm.validateField('nature')
+        },
+
+        // 图片上传成功
+        async UploadSuccessEventsupplier_img(data) {
+            await this.UploadSuccessEvent(1, data)
+        },
+        // //图片上传成功
+        // async UploadSuccessEventgood_img(data) {
+        //   await this.UploadSuccessEvent(2, data);
+        // },
+        // 图片上传成功
+        async UploadSuccessEventgood_info_img(data) {
+            await this.UploadSuccessEvent(3, data)
+        },
+        // 图片上传成功
+        async UploadSuccessEvent(type, data) {
+            const { url } = data
+            if (url === 'noToken') {
+                await this.logout()
+            } else {
+                if (type === 1) {
+                    this.ruleForm.supplier_img = url
+                    this.$refs.ruleForm.validateField('supplier_img')
+                } else if (type === 2) {
+                    this.ruleForm.good_img = url
+                    this.$refs.ruleForm.validateField('good_img')
+                } else {
+                    this.ruleForm.prove_img.push(url)
+                    this.$refs.ruleForm.validateField('prove_img')
+                }
+                this.$message.success('图片上传成功!')
+            }
+        },
+        // 图片上传失败
+        UploadErrorEventsupplier_img(res) {
+            this.imgUploadError(1, res)
+        },
+        // //图片上传失败
+        // UploadErrorEventgood_img(res) {
+        //   this.imgUploadError(2, res);
+        // },
+        // 图片上传失败
+        UploadErrorEventgood_info_img(res) {
+            this.imgUploadError(3, res)
+        },
+        imgUploadError(type, res) {
+            if (res !== 'break') {
+                this.$message.error('图片上传失败!')
+                this.$refs.ruleForm.validateField(
+                    type === 1 ? 'supplier_img' : type === 2 ? 'good_img' : 'good_info_img'
+                )
+            }
+        },
+        // 判断图片规格
+        beforeAvatarUpload(file) {
+            let isJPG = false
+            if (
+        file.type === 'image/jpg' ||
+        file.type === 'image/png' ||
+        file.type === 'image/jpeg'
+      ) {
+                isJPG = true
+            }
+            const isLt2M = file.size / 1024 / 1024 < 1
+            if (!isJPG) {
+                this.$message.error('图片格式不正确!')
+            }
+            if (!isLt2M) {
+                this.$message.error('图片大小不能超过 1MB!')
+            }
+            return isJPG && isLt2M
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.supplierAdd {
+  .good_info_img_div {
+    ul {
+      width: 100%;
+      li {
+        float: left;
+        width: 55px;
+        height: 55px;
+        padding: 0 5px 0 0;
+        .img-show-li-div {
+          width: 50px;
+          height: 50px;
+          border: 1px solid #dfe4ed;
+          background: #dfe4ed;
+          position: relative;
+          img.img-show {
+            width: 100%;
+            height: 100%;
+            position: relative;
+            display: inline-block;
+          }
+          i.el-icon-close {
+            position: absolute;
+            z-index: 2;
+            top: 0;
+            right: 0;
+            color: #dfe4ed;
+          }
+          &:hover {
+            i.el-icon-close {
+              cursor: pointer;
+              color: #6954f0;
+            }
+          }
+        }
+      }
+    }
+  }
+  .supplierAdd-title {
+    border-left: 5px solid #006eff;
+    margin: 6px 0 25px 10px;
+    height:120%;
+    width: 100%;
+    box-sizing: border-box;
+    padding: 0 0 0 10px;
+  }
+}
+</style>