qukaidi 3 éve
szülő
commit
182446b7b3

+ 10 - 3
src/views/reimbursement/detail.vue

@@ -323,11 +323,13 @@ export default {
         this.dataList = this.form.itemList ? this.form.itemList : [];
         this.dataList.forEach(item => {
           this.moldChange(item.moldId, item, this.dicArea)
-          item.payMethod = item.payMethod.toString();
+          if (item.payMethod) {
+            item.payMethod = item.payMethod.toString();
+          }
         })
         delete this.form.itemList;
-        this.oldForm = { ...this.form };
-        this.oldDataList = [...this.dataList];
+        this.oldForm =this.deepClone({ ...this.form });
+        this.oldDataList =this.deepClone([...this.dataList]);
         this.checkDisabled = this.form.status > 0 ? true : false;
         if (this.form.status > 0) {
           this.option.column.map(e => {
@@ -361,6 +363,11 @@ export default {
     },
     //修改提交触发
     editCustomer(status) {
+      for (let i = 0; i < this.dataList.length; i++) {
+        if (this.dataList[i].amount == null) {
+          return this.$message.error("报销明细第" + Number(i + 1) + "行的金额不能为空");
+        }
+      }
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {

+ 6 - 2
src/views/saleLeads/detail.vue

@@ -7,7 +7,7 @@
       </div>
       <div class="add-customer-btn">
         <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="openEdit"
-          v-if="disabled && !approvalStatus">编 辑
+          v-if="disabled && !approvalStatus && form.status != 1">编 辑
         </el-button>
         <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="submit" v-if="form.status == 1">
           提交
@@ -17,7 +17,8 @@
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="form.status > 0 || approvalStatus" @click.native="pleaseCheck">请核数据
+            <el-dropdown-item :disabled="form.status > 0 && form.status != 2 || approvalStatus"
+              @click.native="pleaseCheck">请核数据
             </el-dropdown-item>
             <el-dropdown-item :disabled="!form.approvalStatus"
               @click.native="checkScheduleDialog = true, checkId = form.id">审核进度</el-dropdown-item>
@@ -486,6 +487,9 @@ export default {
     // 编辑按钮触发
     openEdit() {
       this.disabled = false;
+      this.option.column.map(e => {
+        this.$set(e, 'disabled', false)
+      })
     },
     // 复制
     copyDoc() {

+ 1 - 1
src/views/saleLeads/index.vue

@@ -13,7 +13,7 @@
         </template>
         <template slot-scope="scope" slot="menu">
           <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(scope.row, scope.index)"
-            :disabled="scope.row.status == 1">删除
+            :disabled="scope.row.status == 1||scope.row.approvalStatus&&scope.row.approvalStatus!='B'">删除
           </el-button>
         </template>
         <template slot="corpNameSearch">

+ 13 - 0
src/views/statisticAnalysis/commissionStatistics/index.vue

@@ -9,6 +9,10 @@
           <el-button type="info" size="small" @click="outExport">导出
           </el-button>
         </template> -->
+        <template slot="userNameSearch">
+          <user-select v-model="search.userName" :configuration="UConfiguration">
+          </user-select>
+        </template>
         <template slot="businesDateSearch">
           <el-date-picker v-model="search.businesDate" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
             format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
@@ -27,6 +31,15 @@ export default {
   name: "index",
   data() {
     return {
+      UConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
       form: {},
       search: {},
       dataList: [],

+ 13 - 0
src/views/statisticAnalysis/taskStatistics/index.vue

@@ -9,6 +9,10 @@
           <el-button type="info" size="small" @click="outExport">导出
           </el-button>
         </template> -->
+        <template slot="userNameSearch">
+          <user-select v-model="search.userName" :configuration="UConfiguration">
+          </user-select>
+        </template>
         <template slot="businesDateSearch">
           <el-date-picker v-model="search.businesDate" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
             format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
@@ -27,6 +31,15 @@ export default {
   name: "index",
   data() {
     return {
+      UConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
       form: {},
       search: {},
       dataList: [],

+ 82 - 286
src/views/workManagement/handoverSheet/detail.vue

@@ -2,341 +2,130 @@
   <div class="borderless" v-loading="pageLoading">
     <div class="customer-head">
       <div class="customer-back">
-        <el-button
-          type="danger"
-          style="border: none;background: none;color: red"
-          icon="el-icon-arrow-left"
-          @click="backToList"
-          :loading="btnLoading"
-          >返回列表</el-button
-        >
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+          @click="backToList" :loading="btnLoading">返回列表</el-button>
       </div>
       <div class="add-customer-btn">
-        <el-button
-          type="primary"
-          size="small"
-          class="el-button--small-yh"
-          @click.stop="openEdit"
-          v-if="disabled"
-          >编 辑</el-button
-        >
-        <el-button
-          v-if="
-            form.id &&
-              loginUser === form.handingUser &&
-              form.confirmStatus !== 1
-          "
-          type="primary"
-          size="small"
-          class="el-button--small-yh"
-          :loading="btnLoading"
-          @click="submitConfirm"
-          :disabled="!form.id || disabled"
-          >提交确认</el-button
-        >
-        <el-button
-          v-if="checker && form.status != 3"
-          type="primary"
-          size="small"
-          class="el-button--small-yh"
-          @click.stop="openCheckDialog"
-        >
+        <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="openEdit" v-if="disabled">编 辑
+        </el-button>
+        <el-button v-if="
+          form.id &&
+          loginUser === form.handingUser &&
+          form.confirmStatus !== 1
+        " type="primary" size="small" class="el-button--small-yh" :loading="btnLoading" @click="submitConfirm"
+          :disabled="!form.id || disabled">提交确认</el-button>
+        <el-button v-if="checker && form.status != 3" type="primary" size="small" class="el-button--small-yh"
+          @click.stop="openCheckDialog">
           审批
         </el-button>
-        <el-button
-          v-if="form.status > 0"
-          @click.native="(checkScheduleDialog = true), (checkId = form.id)"
-          type="primary"
-          size="small"
-          >审核进度</el-button
-        >
-        <el-button
-          type="primary"
-          v-if="!checkDisabled"
-          :disabled="!form.id || disabled || form.confirmStatus !== 1"
-          size="small"
-          @click="pleaseCheck"
-          :loading="btnLoading"
-          >请核</el-button
-        >
-        <el-button
-          type="success"
-          :disabled="!form.id"
-          size="small"
-          @click="copyDoc"
-          :loading="btnLoading"
-          v-if="false"
-          >复制单据</el-button
-        >
-        <el-button
-          type="primary"
-          @click="editCustomer"
-          size="small"
-          :loading="btnLoading"
-          >保存数据</el-button
-        >
+        <el-button v-if="form.status > 0" @click.native="(checkScheduleDialog = true), (checkId = form.id)"
+          type="primary" size="small">审核进度</el-button>
+        <el-button type="primary" v-if="!checkDisabled" :disabled="!form.id || disabled || form.confirmStatus !== 1"
+          size="small" @click="pleaseCheck" :loading="btnLoading">请核</el-button>
+        <el-button type="success" :disabled="!form.id" size="small" @click="copyDoc" :loading="btnLoading" v-if="false">
+          复制单据</el-button>
+        <el-button type="primary" @click="editCustomer" size="small" :loading="btnLoading">保存数据</el-button>
       </div>
     </div>
     <div class="customer-main">
       <containerTitle title="基础信息" />
       <basic-container :showBtn="true">
-        <avue-form
-          ref="form"
-          class="trading-form"
-          v-model="form"
-          :option="option"
-        >
+        <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="corpId">
-            <crop-select
-              v-model="form.corpId"
-              @getCorpData="getKHData"
-              corpType="KH"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-            />
+            <crop-select v-model="form.corpId" @getCorpData="getKHData" corpType="KH"
+              :disabled="disabled || checkDisabled || confirmDisabled" />
           </template>
           <template slot="chargeStatus">
-            <el-switch
-              v-model="form.chargeStatus"
-              active-text="是"
-              inactive-text="否"
-              :active-value="1"
-              :inactive-value="0"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              @change="chargeStatusChange"
-            ></el-switch>
+            <el-switch v-model="form.chargeStatus" active-text="是" inactive-text="否" :active-value="1"
+              :inactive-value="0" :disabled="disabled || checkDisabled || confirmDisabled" @change="chargeStatusChange">
+            </el-switch>
           </template>
           <template slot="handingUser">
-            <el-select
-              v-model="form.handingUser"
-              filterable
-              clearable
-              size="small"
-              placeholder="请选择"
-              :disabled="
-                disabled ||
-                  checkDisabled ||
-                  form.chargeStatus == 0 ||
-                  confirmDisabled
-              "
-              @change="handingUserChange"
-            >
-              <el-option
-                v-for="(item, index) in userList"
-                :key="index"
-                :label="item.realName"
-                :value="item.id"
-              ></el-option>
+            <el-select v-model="form.handingUser" filterable clearable size="small" placeholder="请选择" :disabled="
+              disabled ||
+              checkDisabled ||
+              confirmDisabled
+            " @change="handingUserChange">
+              <el-option v-for="(item, index) in userList" :key="index" :label="item.realName" :value="item.id">
+              </el-option>
             </el-select>
           </template>
           <template slot="handingUserName">
-            <el-select
-              v-model="form.handingUserName"
-              filterable
-              clearable
-              allow-create
-              default-first-option
-              size="small"
-              placeholder="请选择"
-              :disabled="
+            <el-select v-model="form.handingUserName" filterable clearable allow-create default-first-option
+              size="small" placeholder="请选择" :disabled="
                 disabled ||
-                  checkDisabled ||
-                  form.chargeStatus == 0 ||
-                  confirmDisabled
-              "
-            >
-              <el-option
-                v-for="(item, index) in userList"
-                :key="index"
-                :label="item.realName"
-                :value="item.realName"
-              ></el-option>
+                checkDisabled ||
+                form.chargeStatus == 0 ||
+                confirmDisabled
+              ">
+              <el-option v-for="(item, index) in userList" :key="index" :label="item.realName" :value="item.realName">
+              </el-option>
             </el-select>
           </template>
           <template slot="external">
-            <el-switch
-              v-model="form.external"
-              active-text="是"
-              inactive-text="否"
-              :active-value="1"
-              :inactive-value="0"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              @change="externalChange"
-            ></el-switch>
+            <el-switch v-model="form.external" active-text="是" inactive-text="否" :active-value="1" :inactive-value="0"
+              :disabled="disabled || checkDisabled || confirmDisabled" @change="externalChange"></el-switch>
           </template>
         </avue-form>
       </basic-container>
       <containerTitle title="详情内容" />
       <basic-container>
-        <avue-crud
-          ref="crud"
-          :data="dataList"
-          :option="tableOption"
-          :cell-style="cellStyle"
-          @saveColumn="saveColumn"
-          @resetColumn="resetColumn"
-        >
+        <avue-crud ref="crud" :data="dataList" :option="tableOption" :cell-style="cellStyle" @saveColumn="saveColumn"
+          @resetColumn="resetColumn">
           <template slot="menuLeft">
-            <el-button
-              type="primary"
-              icon="el-icon-plus"
-              size="small"
-              @click.stop="newDetails"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              >录入明细</el-button
-            >
-            <el-button
-              type="info"
-              icon="el-icon-printer"
-              size="small"
-              @click="openReport"
-              >报表打印</el-button
-            >
+            <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newDetails"
+              :disabled="disabled || checkDisabled || confirmDisabled">录入明细</el-button>
+            <el-button type="info" icon="el-icon-printer" size="small" @click="openReport">报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button
-              size="small"
-              icon="el-icon-edit"
-              type="text"
-              @click="rowCell(row, index)"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
-            >
-            <el-button
-              size="small"
-              icon="el-icon-upload"
-              type="text"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              @click="annexOpen(row, index)"
-              >附件</el-button
-            >
-            <el-button
-              size="small"
-              icon="el-icon-delete"
-              type="text"
-              @click="rowDel(row, index)"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              >删除</el-button
-            >
+            <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
+              :disabled="disabled || checkDisabled || confirmDisabled">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
+            <el-button size="small" icon="el-icon-upload" type="text"
+              :disabled="disabled || checkDisabled || confirmDisabled" @click="annexOpen(row, index)">附件</el-button>
+            <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+              :disabled="disabled || checkDisabled || confirmDisabled">删除</el-button>
           </template>
           <template slot="quantity" slot-scope="{ row, index }">
-            <el-input-number
-              v-if="row.$cellEdit"
-              v-model="row.quantity"
-              size="small"
-              :controls="false"
-              :precision="0"
-              style="width: 100%"
-              placeholder="数量"
-            ></el-input-number>
+            <el-input-number v-if="row.$cellEdit" v-model="row.quantity" size="small" :controls="false" :precision="0"
+              style="width: 100%" placeholder="数量"></el-input-number>
             <span v-else>{{ row.quantity }}</span>
           </template>
           <template slot-scope="{ row, index }" slot="unit">
-            <el-select
-              v-if="row.$cellEdit"
-              v-model="row.unit"
-              size="small"
-              clearable
-              filterable
-            >
-              <el-option
-                v-for="(item, index) in unitOption"
-                :key="index"
-                :label="item.dictValue"
-                :value="item.dictValue"
-              />
+            <el-select v-if="row.$cellEdit" v-model="row.unit" size="small" clearable filterable>
+              <el-option v-for="(item, index) in unitOption" :key="index" :label="item.dictValue"
+                :value="item.dictValue" />
             </el-select>
             <span v-else>{{ row.unit }}</span>
           </template>
           <template slot="amount" slot-scope="{ row, index }">
-            <el-input-number
-              v-if="row.$cellEdit"
-              v-model="row.amount"
-              size="small"
-              :controls="false"
-              :precision="2"
-              style="width: 100%"
-              placeholder="金额"
-            ></el-input-number>
+            <el-input-number v-if="row.$cellEdit" v-model="row.amount" size="small" :controls="false" :precision="2"
+              style="width: 100%" placeholder="金额"></el-input-number>
             <span v-else>{{ row.amount }}</span>
           </template>
         </avue-crud>
       </basic-container>
       <containerTitle title="客户未收款" />
       <basic-container>
-        <avue-form
-          ref="detailForm"
-          class="trading-form"
-          v-model="form"
-          :option="detailOption"
-        ></avue-form>
+        <avue-form ref="detailForm" class="trading-form" v-model="form" :option="detailOption"></avue-form>
       </basic-container>
     </div>
 
-    <el-dialog
-      append-to-body
-      title="审批"
-      class="el-dialogDeep"
-      :visible.sync="checkDialog"
-      width="50%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      v-dialog-drag
-    >
-      <check
-        :checkData="checkData"
-        :checkDetail="false"
-        :idList="[]"
-        @choceCheckFun="choceCheckFun"
-      />
+    <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+      <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun" />
     </el-dialog>
-    <el-dialog
-      append-to-body
-      title="审批进度"
-      class="el-dialogDeep"
-      :visible.sync="checkScheduleDialog"
-      width="40%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      v-dialog-drag
-    >
-      <check-schedule
-        :checkId="checkId"
-        :batchNo="batchNo"
-        @choceScheduleFun="choceScheduleFun"
-      />
+    <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+      <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun" />
     </el-dialog>
     <!--    报表-->
-    <report-dialog
-      :switchDialog="switchDialog"
-      :reportId="form.id"
-      reportName="交接单"
-      @onClose="onClose()"
-    />
-    <el-dialog
-      title="附件"
-      :visible.sync="dialogVisible"
-      append-to-body
-      width="70%"
-    >
-      <c-upload
-        typeUpload="PC"
-        :basic="true"
-        deleteUrl="/api/blade-client/common-file/remove"
-        :data="orderList"
-        :disabled="upLoadForm.status >= 2"
-        :enumerationValue="124"
-      ></c-upload>
+    <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="交接单" @onClose="onClose()" />
+    <el-dialog title="附件" :visible.sync="dialogVisible" append-to-body width="70%">
+      <c-upload typeUpload="PC" :basic="true" deleteUrl="/api/blade-client/common-file/remove" :data="orderList"
+        :disabled="upLoadForm.status >= 2" :enumerationValue="124"></c-upload>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false" size="small">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="saveAnnex"
-          size="small"
-          :disabled="upLoadForm.status >= 2"
-          >保 存</el-button
-        >
+        <el-button type="primary" @click="saveAnnex" size="small" :disabled="upLoadForm.status >= 2">保 存</el-button>
       </span>
     </el-dialog>
   </div>
@@ -450,7 +239,13 @@ export default {
             label: "接收人",
             prop: "handingUser",
             span: 8,
-            rules: [{ validator: validateHandingUser, trigger: "change" }]
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "change"
+              }
+            ],
           },
           {
             label: "是否外部交接单",
@@ -850,7 +645,7 @@ export default {
     }
   },
   watch: {
-    "form.external": function(obj) {
+    "form.external": function (obj) {
       if (obj == 1) {
         this.findObject(this.option.column, "handingCorpName").display = true;
       } else {
@@ -861,4 +656,5 @@ export default {
 };
 </script>
 
-<style scoped></style>
+<style scoped>
+</style>