Przeglądaj źródła

仓库流程驳回bug

yusheng 1 rok temu
rodzic
commit
b3f5e82c2d

+ 652 - 602
src/views/bpm/handleTask/components/certificateQualifications/certificateQualificationsDialog.vue

@@ -1,624 +1,674 @@
 <template>
- <div>
-   <el-tabs v-model="activeName" >
-     <el-tab-pane label="客户信息" v-if="form.isShowContact" name="1"  >
-       <contactDetailDialog style="margin-top: 10px;" :businessId="businessId" :taskDefinitionKey="taskDefinitionKey"></contactDetailDialog>
-     </el-tab-pane>
-     <el-tab-pane label="资质信息" name="2">
-       <el-form ref="form" style="margin-top: 10px;"  :model="form" :rules="rules" class="el-form-box">
-         <headerTitle title="基本信息"/>
-         <el-row :gutter="20">
-           <!--        <el-col :span="12">-->
-           <!--          <el-form-item label="编码:" prop="code" label-width="90px">-->
-           <!--            <el-input-->
-           <!--              :disabled="type=='view'"-->
-           <!--              v-model="form.code"-->
-           <!--              clearable-->
-           <!--              placeholder="请输入"-->
-           <!--            />-->
-           <!--          </el-form-item>-->
-           <!--        </el-col>-->
-           <el-col :span="12">
-             <el-form-item label="名称" prop="name"
-                           label-width="90px"
-                           :rules=" {required: true, message: '请输入',trigger: 'blur' }">
-               <el-input v-model="form.name" :disabled="type=='view'" clearable></el-input>
-             </el-form-item>
-           </el-col>
-           <el-col :span="12">
-             <el-form-item label="有效时间:" prop="date" label-width="90px">
-               <el-date-picker
-                 :disabled="type=='view'"
-                 v-model="form.date"
-                 style="width: 100%;"
-                 type="daterange"
-                 value-format="yyyy-MM-dd"
-                 range-separator="至"
-                 start-placeholder="开始日期"
-                 end-placeholder="结束日期"
-               >
-               </el-date-picker>
-             </el-form-item>
-           </el-col>
-
-         </el-row>
-         <el-row :gutter="20">
-           <el-col :span="12">
-             <el-form-item label="资质类型:" prop="certificationType" label-width="90px">
-               <el-select
-                 style="width: 100%"
-                 :disabled="type=='view'"
-                 v-model="form.certificationType"
-                 @change="changeCertificationType"
-                 filterable
-               >
-                 <el-option
-                   v-for="item in qualificationOptions"
-                   :key="item.value"
-                   :label="item.label"
-                   :value="item.value"
-                 >
-                 </el-option>
-               </el-select>
-             </el-form-item>
-           </el-col>
-           <el-col :span="12">
-             <el-form-item label="关联类型:" prop="relationName" label-width="90px">
-               <el-input
-                 :disabled="type=='view'"
-                 v-model="form.relationName"
-                 readonly
-                 clearable
-                 @click.native="handleClick"
-                 placeholder="请选择"
-               />
-             </el-form-item>
-           </el-col>
-         </el-row>
-         <el-row :gutter="20">
-           <el-col :span="12">
-             <el-form-item label="备注" label-width="90px">
-               <el-input type="textarea" v-model="form.remark" :disabled="type=='view'" clearable></el-input>
-             </el-form-item>
-           </el-col>
-           <el-col :span="12">
-             <el-form-item label="附件:" prop="accessory" label-width="90px">
-               <fileMain v-model="form.accessory" :type="type" ></fileMain>
-               <!--           <fileUpload-->
-               <!--             v-if="type!=='view'"-->
-               <!--             v-model="form.accessory"-->
-               <!--             module="main"-->
-               <!--             :showLib="false"-->
-               <!--             :limit="10"/>-->
-               <!--           <div v-else>-->
-               <!--             <el-link-->
-               <!--               v-for="link in form.accessory"-->
-               <!--               :key="link.id"-->
-               <!--               type="primary"-->
-               <!--               :underline="false"-->
-               <!--               @click="downloadFile(link)">-->
-               <!--               {{ link.name }}-->
-               <!--             </el-link>-->
-               <!--           </div>-->
-             </el-form-item>
-           </el-col>
-         </el-row>
-         <headerTitle title="资质信息"/>
-         <ele-pro-table ref="linkTable" :columns="columns" :datasource="form.detailsList" :toolkit="[]" height="300px"
-                        :need-page="false">
-           <!-- 表头工具栏 -->
-           <template v-slot:toolbar>
-
-             <el-button v-if="type!=='view'" type="primary" @click="handleAdd">添加</el-button>
-           </template>
-           <template v-slot:name="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.name'" :rules="{
-            required: true,
-            message: '',
-            trigger: 'change'
-          }">
-               <el-select v-if="type!=='view'" v-model="scope.row.name" clearable>
-                 <el-option :disabled="disabledToType(scope.row).includes(item.dictCode)"
-                            v-for="item in dictList" :value="item.dictValue"
-                            :label="item.dictValue"></el-option>
-               </el-select>
-               <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
-               <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
-               <span v-else>{{ scope.row.name}}</span>
-             </el-form-item>
-
-           </template>
-           <template v-slot:code="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.code'" :rules="{
-            required: true,
-            message: '',
-            trigger: 'blur'
-          }">
-               <el-input v-model="scope.row.code" :disabled="type=='view'" clearable></el-input>
-             </el-form-item>
-
-           </template>
-           <template v-slot:businessRange="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.businessRange'">
-               <el-input type="textarea" v-model="scope.row.businessRange" :disabled="type=='view'" clearable></el-input>
-             </el-form-item>
-           </template>
-           <template v-slot:startTime="scope">
-             <el-form-item inline-message :prop="'detailsList.' + scope.$index + '.startTime'" :rules="{
-            required: true,
-            message: '',
-            trigger: 'change'
-
-          }">
-               <el-date-picker
-                 :disabled="type=='view'"
-                 v-model="scope.row.startTime"
-                 type="date"
-                 style="width: 100%"
-                 value-format="yyyy-MM-dd"
-                 placeholder="选择日期">
-               </el-date-picker>
-             </el-form-item>
-
-           </template>
-           <template v-slot:endTime="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.endTime'"
-                           :rules="{
-            required: true,
-            validator: validateEndDate(scope.row,scope.$index),
-            trigger: ['blur','change']
-          }">
-               <el-date-picker
-                 :disabled="type=='view'"
-                 v-model="scope.row.endTime"
-                 type="date"
-                 style="width: 100%"
-                 value-format="yyyy-MM-dd"
-                 placeholder="选择日期">
-               </el-date-picker>
-             </el-form-item>
-
-           </template>
-           <template v-slot:noticePersonName="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.noticePersonName'" :rules="{
-            required: true,
-            message: '',
-            trigger: ['blur','change']
-
-          }">
-               <el-input
-                 :disabled="type=='view'"
-                 @click.native="openStaffSelection(scope.$index)"
-                 v-model="scope.row.noticePersonName"
-                 placeholder="请选择"
-               ></el-input>
-             </el-form-item>
-
-           </template>
-           <template v-slot:accessory="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.accessory'" :rules="{
-            required: true,
-            message: '',
-            trigger: ['change','blur']
-          }">
-               <fileMain v-model="scope.row.accessory" :type="type" ></fileMain>
-               <!--           <fileUpload-->
-               <!--             v-if="type!=='view'"-->
-               <!--             v-model="scope.row.accessory"-->
-               <!--             module="main"-->
-               <!--             :showLib="false"-->
-               <!--             :limit="10"/>-->
-               <!--           <div v-else>-->
-               <!--             <el-link-->
-               <!--               v-for="link in scope.row.accessory"-->
-               <!--               :key="link.id"-->
-               <!--               type="primary"-->
-               <!--               :underline="false"-->
-               <!--               @click="downloadFile(link)">-->
-               <!--               {{ link.name }}-->
-               <!--             </el-link>-->
-               <!--           </div>-->
-             </el-form-item>
-
-           </template>
-           <template v-slot:type="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.type'">
-               <el-select v-if="type!=='view'" v-model="scope.row.type" clearable>
-                 <el-option v-for="item in typeList" :value="item.dictCode"
-                            :label="item.dictValue"></el-option>
-               </el-select>
-               <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
-               <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
-               <span v-else>{{ getLabelName(typeList, scope.row.type) }}</span>
-             </el-form-item>
-
-           </template>
-           <template v-slot:level="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.level'">
-               <el-select v-if="type!=='view'" v-model="scope.row.level" clearable>
-                 <el-option v-for="item in levelOptions" :value="item.dictCode"
-                            :label="item.dictValue"></el-option>
-               </el-select>
-               <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
-               <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
-               <span v-else>{{ getLabelName(levelOptions, scope.row.type) }}</span>
-             </el-form-item>
-
-           </template>
-           <template v-slot:remark="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.remark'">
-               <el-input type="textarea" :disabled="type=='view'" v-model="scope.row.remark"></el-input>
-             </el-form-item>
-           </template>
-           <template v-slot:status="scope">
-             <el-form-item :prop="'detailsList.' + scope.$index + '.status'">
-               <el-tag v-if="scope.row.status" :type="statusTagTypeList[scope.row.status]">
-                 {{ statusList[scope.row.status] }}
-               </el-tag>
-             </el-form-item>
-           </template>
-           <template v-slot:isRequired="{ column }">
-             <span class="is-required">{{ column.label }}</span>
-           </template>
-           <template v-slot:action="{ row, $index }">
-             <el-popconfirm
-               class="ele-action"
-               title="确定要删除该信息吗?"
-               @confirm="handleRemove($index)"
-             >
-               <template v-slot:reference>
-                 <el-link
-                   v-if="type!=='view'"
-                   type="danger"
-                   :underline="false"
-                   icon="el-icon-delete"
-                 >
-                   删除
-                 </el-link>
-               </template>
-             </el-popconfirm>
-           </template>
-
-         </ele-pro-table>
-
-       </el-form>
-     </el-tab-pane>
-   </el-tabs>
-
- </div>
+  <div>
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="客户信息" v-if="form.isShowContact" name="1">
+        <contactDetailDialog
+          style="margin-top: 10px"
+          :businessId="businessId"
+          :taskDefinitionKey="taskDefinitionKey"
+        ></contactDetailDialog>
+      </el-tab-pane>
+      <el-tab-pane label="资质信息" name="2">
+        <el-form
+          ref="form"
+          style="margin-top: 10px"
+          :model="form"
+          :rules="rules"
+          class="el-form-box"
+        >
+          <headerTitle title="基本信息" />
+          <el-row :gutter="20">
+            <!--        <el-col :span="12">-->
+            <!--          <el-form-item label="编码:" prop="code" label-width="90px">-->
+            <!--            <el-input-->
+            <!--              :disabled="type=='view'"-->
+            <!--              v-model="form.code"-->
+            <!--              clearable-->
+            <!--              placeholder="请输入"-->
+            <!--            />-->
+            <!--          </el-form-item>-->
+            <!--        </el-col>-->
+            <el-col :span="12">
+              <el-form-item
+                label="名称"
+                prop="name"
+                label-width="90px"
+                :rules="{ required: true, message: '请输入', trigger: 'blur' }"
+              >
+                <el-input
+                  v-model="form.name"
+                  :disabled="type == 'view'"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="有效时间:" prop="date" label-width="90px">
+                <el-date-picker
+                  :disabled="type == 'view'"
+                  v-model="form.date"
+                  style="width: 100%"
+                  type="daterange"
+                  value-format="yyyy-MM-dd"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item
+                label="资质类型:"
+                prop="certificationType"
+                label-width="90px"
+              >
+                <el-select
+                  style="width: 100%"
+                  :disabled="type == 'view'"
+                  v-model="form.certificationType"
+                  @change="changeCertificationType"
+                  filterable
+                >
+                  <el-option
+                    v-for="item in qualificationOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item
+                label="关联类型:"
+                prop="relationName"
+                label-width="90px"
+              >
+                <el-input
+                  :disabled="type == 'view'"
+                  v-model="form.relationName"
+                  readonly
+                  clearable
+                  @click.native="handleClick"
+                  placeholder="请选择"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="备注" label-width="90px">
+                <el-input
+                  type="textarea"
+                  v-model="form.remark"
+                  :disabled="type == 'view'"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="附件:" prop="accessory" label-width="90px">
+                <fileMain v-model="form.accessory" :type="type"></fileMain>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <headerTitle title="资质信息" />
+          <ele-pro-table
+            ref="linkTable"
+            :columns="columns"
+            :datasource="form.detailsList"
+            :toolkit="[]"
+            height="300px"
+            :need-page="false"
+          >
+            <!-- 表头工具栏 -->
+            <template v-slot:toolbar>
+              <el-button
+                v-if="type !== 'view'"
+                type="primary"
+                @click="handleAdd"
+                >添加</el-button
+              >
+            </template>
+            <template v-slot:name="scope">
+              <el-form-item
+                :prop="'detailsList.' + scope.$index + '.name'"
+                :rules="{
+                  required: true,
+                  message: '',
+                  trigger: 'change'
+                }"
+              >
+                <el-select
+                  v-if="type !== 'view'"
+                  v-model="scope.row.name"
+                  clearable
+                >
+                  <el-option
+                    :disabled="
+                      disabledToType(scope.row).includes(item.dictCode)
+                    "
+                    v-for="item in dictList"
+                    :value="item.dictValue"
+                    :label="item.dictValue"
+                  ></el-option>
+                </el-select>
 
+                <span v-else>{{ scope.row.name }}</span>
+              </el-form-item>
+            </template>
+            <template v-slot:code="scope">
+              <el-form-item
+                :prop="'detailsList.' + scope.$index + '.code'"
+              
+              >
+                <el-input
+                  v-model="scope.row.code"
+                  :disabled="type == 'view'"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </template>
+            <template v-slot:businessRange="scope">
+              <el-form-item
+                :prop="'detailsList.' + scope.$index + '.businessRange'"
+              >
+                <el-input
+                  type="textarea"
+                  v-model="scope.row.businessRange"
+                  :disabled="type == 'view'"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </template>
+            <template v-slot:startTime="scope">
+              <el-form-item
+                inline-message
+                :prop="'detailsList.' + scope.$index + '.startTime'"
+           
+              >
+                <el-date-picker
+                  :disabled="type == 'view'"
+                  v-model="scope.row.startTime"
+                  type="date"
+                  style="width: 100%"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </template>
+            <template v-slot:endTime="scope">
+              <el-form-item
+                :prop="'detailsList.' + scope.$index + '.endTime'"
+           
+              >
+                <el-date-picker
+                  :disabled="type == 'view'"
+                  v-model="scope.row.endTime"
+                  type="date"
+                  style="width: 100%"
+                  value-format="yyyy-MM-dd"
+                  placeholder="选择日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </template>
+            <template v-slot:noticePersonName="scope">
+              <el-form-item
+                :prop="'detailsList.' + scope.$index + '.noticePersonName'"
+               
+              >
+                <el-input
+                  :disabled="type == 'view'"
+                  @click.native="openStaffSelection(scope.$index)"
+                  v-model="scope.row.noticePersonName"
+                  placeholder="请选择"
+                ></el-input>
+              </el-form-item>
+            </template>
+            <template v-slot:accessory="scope">
+              <el-form-item
+                :prop="'detailsList.' + scope.$index + '.accessory'"
+                :rules="{
+                  required: true,
+                  message: '',
+                  trigger: ['change', 'blur']
+                }"
+              >
+                <fileMain v-model="scope.row.accessory" :type="type"></fileMain>
+            
+              </el-form-item>
+            </template>
+            <template v-slot:type="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.type'">
+                <el-select
+                  v-if="type !== 'view'"
+                  v-model="scope.row.type"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in typeList"
+                    :value="item.dictCode"
+                    :label="item.dictValue"
+                  ></el-option>
+                </el-select>
+             
+                <span v-else>{{ getLabelName(typeList, scope.row.type) }}</span>
+              </el-form-item>
+            </template>
+            <template v-slot:level="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.level'">
+                <el-select
+                  v-if="type !== 'view'"
+                  v-model="scope.row.level"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in levelOptions"
+                    :value="item.dictCode"
+                    :label="item.dictValue"
+                  ></el-option>
+                </el-select>
+                <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
+                <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
+                <span v-else>{{
+                  getLabelName(levelOptions, scope.row.type)
+                }}</span>
+              </el-form-item>
+            </template>
+            <template v-slot:remark="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.remark'">
+                <el-input
+                  type="textarea"
+                  :disabled="type == 'view'"
+                  v-model="scope.row.remark"
+                ></el-input>
+              </el-form-item>
+            </template>
+            <template v-slot:status="scope">
+              <el-form-item :prop="'detailsList.' + scope.$index + '.status'">
+                <el-tag
+                  v-if="scope.row.status"
+                  :type="statusTagTypeList[scope.row.status]"
+                >
+                  {{ statusList[scope.row.status] }}
+                </el-tag>
+              </el-form-item>
+            </template>
+            <template v-slot:isRequired="{ column }">
+              <span class="is-required">{{ column.label }}</span>
+            </template>
+            <template v-slot:action="{ row, $index }">
+              <el-popconfirm
+                class="ele-action"
+                title="确定要删除该信息吗?"
+                @confirm="handleRemove($index)"
+              >
+                <template v-slot:reference>
+                  <el-link
+                    v-if="type !== 'view'"
+                    type="danger"
+                    :underline="false"
+                    icon="el-icon-delete"
+                  >
+                    删除
+                  </el-link>
+                </template>
+              </el-popconfirm>
+            </template>
+          </ele-pro-table>
+        </el-form>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
 </template>
 <script>
-import {
-  getProfessionCertificationById,
-  saveProfessionCertification,
-  updateProfessionCertificationById,
-  contactQcSubmit
-} from "@/api/bpm/components/qualification";
-import {getFile} from "@/api/system/file";
-import {mapActions, mapGetters} from "vuex";
-import dictEnum from "@/enum/dict";
-import fileMain from "@/components/addDoc/index.vue";
-import contactDetailDialog from '../contactQC/contactDetailDialog.vue'
-export default {
-  name: "addOrEditDialog",
-  components: {fileMain,contactDetailDialog},
-  props:{
-    taskDefinitionKey: {
-      type: String,
-      default: 'starter',
+  import {
+    getProfessionCertificationById,
+    saveProfessionCertification,
+    updateProfessionCertificationById,
+    contactQcSubmit
+  } from '@/api/bpm/components/qualification';
+  import { getFile } from '@/api/system/file';
+  import { mapActions, mapGetters } from 'vuex';
+  import dictEnum from '@/enum/dict';
+  import fileMain from '@/components/addDoc/index.vue';
+  import contactDetailDialog from '../contactQC/contactDetailDialog.vue';
+  export default {
+    name: 'addOrEditDialog',
+    components: { fileMain, contactDetailDialog },
+    props: {
+      taskDefinitionKey: {
+        type: String,
+        default: 'starter'
+      },
+      businessId: {
+        type: String,
+        default: ''
+      }
     },
-    businessId: {
-      type: String,
-      default: ''
-    }
-  },
-  data() {
-    return {
-      title: '',
-      type: 'view',
-      activeName: '2',
-      qualificationOptions: [
-        {
-          label: '客户资质',
-          value: '1'
+    data() {
+      return {
+        title: '',
+        type: 'view',
+        activeName: '2',
+        qualificationOptions: [
+          {
+            label: '客户资质',
+            value: '1'
+          },
+          {
+            label: '供应商资质',
+            value: '2'
+          },
+          {
+            label: '个人资质',
+            value: '3'
+          }
+        ],
+        levelOptions: [
+          {
+            dictValue: '初级',
+            dictCode: '1'
+          },
+          {
+            dictValue: '中级',
+            dictCode: '2'
+          },
+          {
+            dictValue: '高级',
+            dictCode: '3'
+          }
+        ],
+        defaultData: {
+          accessory: [],
+          name: '',
+          noticePersonId: '',
+          noticePersonName: '',
+          num: '',
+          remark: '',
+          businessRange: '',
+          type: '',
+          endTime: '',
+          startTime: ''
         },
-        {
-          label: '供应商资质',
-          value: '2'
+        form: {
+          accessory: [],
+          detailsList: [],
+          relationName: '',
+          isShowContact: 0,
+          name: '',
+          date: [],
+          remark: ''
         },
-        {
-          label: '个人资质',
-          value: '3'
-        }
-      ],
-      levelOptions: [
-        {
-          dictValue: '初级',
-          dictCode: '1'
+        rules: {
+          name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
+          code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
+          certificationType: [
+            { required: true, message: '请选择资质类型', trigger: 'change' }
+          ],
+          relationName: [
+            { required: true, message: '请选择关联类型', trigger: 'change' }
+          ],
+          date: [
+            { required: true, message: '请选择有效时间', trigger: 'change' }
+          ]
         },
-        {
-          dictValue: '中级',
-          dictCode: '2'
+        curIndex: null,
+        StaffType: '',
+
+        statusList: {
+          10: '有效',
+          20: '无效',
+          30: '已过期'
         },
-        {
-          dictValue: '高级',
-          dictCode: '3'
+        statusTagTypeList: {
+          10: 'success',
+          20: 'info',
+          30: 'danger'
         }
-      ],
-      defaultData: {
-        accessory: [],
-        name: "",
-        noticePersonId: "",
-        noticePersonName: "",
-        num: "",
-        remark: "",
-        businessRange: "",
-        type: "",
-        endTime: "",
-        startTime: ""
-      },
-      form: {
-        accessory: [],
-        detailsList: [],
-        relationName: '',
-        isShowContact: 0,
-        name: '',
-        date: [],
-        remark: '',
-
-      },
-      rules: {
-        name: [{required: true, message: '请输入名称', trigger: 'blur'}],
-        code: [{required: true, message: '请输入编码', trigger: 'blur'}],
-        certificationType: [{required: true, message: '请选择资质类型', trigger: 'change'}],
-        relationName: [{required: true, message: '请选择关联类型', trigger: 'change'}],
-        date: [{required: true, message: '请选择有效时间', trigger: 'change'}],
+      };
+    },
+    computed: {
+      ...mapGetters(['dict']),
+      dictList() {
+        return this.dict[dictEnum['客户/供应商资质类型']] || [];
       },
-      curIndex: null,
-      StaffType: '',
-
-      statusList: {
-        10: '有效',
-        20: '无效',
-        30: '已过期',
+      typeList() {
+        return this.dict[dictEnum['工种类型']] || [];
       },
-      statusTagTypeList: {
-        10: 'success',
-        20: 'info',
-        30: 'danger',
+      columns() {
+        return [
+          {
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            label: '名称',
+            prop: 'name',
+            slot: 'name',
+            headerSlot: 'isRequired',
+            minWidth: 180,
+            align: 'center'
+          },
+          {
+            label: '编号',
+            prop: 'code',
+            slot: 'code',
+            // headerSlot: 'isRequired',
+            minWidth: 120,
+            align: 'center'
+          },
+          {
+            label: '许可/经营范围',
+            prop: 'businessRange',
+            slot: 'businessRange',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '有效期起始日期',
+            prop: 'startTime',
+            slot: 'startTime',
+            // headerSlot: 'isRequired',
+            minWidth: 160,
+            align: 'center'
+          },
+          {
+            label: '有效期截止日期',
+            prop: 'endTime',
+            slot: 'endTime',
+            // headerSlot: 'isRequired',
+            minWidth: 160,
+            align: 'center'
+          },
+          {
+            label: '通知人',
+            prop: 'noticePersonName',
+            slot: 'noticePersonName',
+            // headerSlot: 'isRequired',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '附件',
+            prop: 'accessory',
+            slot: 'accessory',
+            headerSlot: 'isRequired',
+            minWidth: 140
+          },
+          {
+            label: '等级',
+            prop: 'level',
+            slot: 'level',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '分类',
+            prop: 'type',
+            slot: 'type',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '备注',
+            prop: 'remark',
+            slot: 'remark',
+            minWidth: 140,
+            align: 'center'
+          }
+        ];
       },
-    }
-  },
-  computed: {
-    ...mapGetters(['dict']),
-    dictList() {
-      return this.dict[dictEnum['客户/供应商资质类型']] || [];
-    },
-    typeList() {
-      return this.dict[dictEnum['工种类型']] || [];
-    },
-    columns() {
-      return [
-        {
-          type: 'index',
-          width: 55,
-          align: 'center'
-        },
-        {
-          label: '名称',
-          prop: 'name',
-          slot: 'name',
-          headerSlot: 'isRequired',
-          minWidth: 180,
-          align: 'center'
-        },
-        {
-          label: '编号',
-          prop: 'code',
-          slot: 'code',
-          headerSlot: 'isRequired',
-          minWidth: 120,
-          align: 'center'
-        },
-        {
-          label: '许可/经营范围',
-          prop: 'businessRange',
-          slot: 'businessRange',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '有效期起始日期',
-          prop: 'startTime',
-          slot: 'startTime',
-          headerSlot: 'isRequired',
-          minWidth: 160,
-          align: 'center'
-        },
-        {
-          label: '有效期截止日期',
-          prop: 'endTime',
-          slot: 'endTime',
-          headerSlot: 'isRequired',
-          minWidth: 160,
-          align: 'center'
-        },
-        {
-          label: '通知人',
-          prop: 'noticePersonName',
-          slot: 'noticePersonName',
-          headerSlot: 'isRequired',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '附件',
-          prop: 'accessory',
-          slot: 'accessory',
-          headerSlot: 'isRequired',
-          minWidth: 140,
-        },
-        {
-          label: '等级',
-          prop: 'level',
-          slot: 'level',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '分类',
-          prop: 'type',
-          slot: 'type',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '备注',
-          prop: 'remark',
-          slot: 'remark',
-          minWidth: 140,
-          align: 'center'
-        }
-      ]
-    },
-    disabledToType() {
-      return (row) => {
-        let list = this.form.detailsList.map(item => item.name)
-        let dictCodeList = this.dictList.map(item => item.dictCode)
-        let intersectionList = list.filter((v) => dictCodeList.indexOf(v) > -1)
-        intersectionList = intersectionList.filter(v => row.name !== v)
-        return intersectionList
+      disabledToType() {
+        return (row) => {
+          let list = this.form.detailsList.map((item) => item.name);
+          let dictCodeList = this.dictList.map((item) => item.dictCode);
+          let intersectionList = list.filter(
+            (v) => dictCodeList.indexOf(v) > -1
+          );
+          intersectionList = intersectionList.filter((v) => row.name !== v);
+          return intersectionList;
+        };
       }
     },
-  },
-  created() {
-    this.requestDict('客户/供应商资质类型');
-    this.requestDict('工种类型');
-    this.getCertificateInfo({id:this.businessId})
-  },
-  methods: {
-    ...mapActions('dict', ['requestDict']),
-    getLabelName(arr, id) {
-      console.log(arr);
-      if (!id) return ''
-      return arr.find(item => item.dictCode == id)?.dictValue
+    created() {
+      this.requestDict('客户/供应商资质类型');
+      this.requestDict('工种类型');
+      this.getCertificateInfo({ id: this.businessId });
     },
-    //删除资质
-    handleRemove(index) {
-      this.form.detailsList.splice(index, 1)
-    },
-    //结束日期验证
-    validateEndDate(row, index) {
-      return (rule, value, callback) => {
-        if (!value) return callback(new Error(''))
-        if (
-          row.endTime &&
-          row.startTime &&
-          value < row.startTime
-        ) {
-          callback(new Error('截止日期不能小于起始日期'))
-        } else {
-          callback()
+    methods: {
+      ...mapActions('dict', ['requestDict']),
+      getLabelName(arr, id) {
+        console.log(arr);
+        if (!id) return '';
+        return arr.find((item) => item.dictCode == id)?.dictValue;
+      },
+      //删除资质
+      handleRemove(index) {
+        this.form.detailsList.splice(index, 1);
+      },
+      //结束日期验证
+      validateEndDate(row, index) {
+        return (rule, value, callback) => {
+          if (!value) return callback(new Error(''));
+          if (row.endTime && row.startTime && value < row.startTime) {
+            callback(new Error('截止日期不能小于起始日期'));
+          } else {
+            callback();
+          }
+        };
+      },
+      //页面初始化
+      init(type, row = {}) {
+        this.title = type == 'add' ? '新增' : type == 'edit' ? '修改' : '详情';
+        this.type = type;
+        if (type !== 'add') {
+          this.getCertificateInfo(row);
         }
-      }
-    },
-    //页面初始化
-    init(type, row = {}) {
-      this.title = type == 'add' ? '新增' : type == 'edit' ? '修改' : '详情'
-      this.type = type
-      if (type !== 'add') {
-        this.getCertificateInfo(row)
-      }
-    },
-
-    handleClick() {
-      switch (this.form.certificationType) {
-        case '1':
-          this.$refs.clientSelection.open();
-          break;
-        case '2':
-          this.$refs.vendorDialogRef.open();
-          break;
-        case '3':
-          this.StaffType = 2
-          this.$refs.staffSelection.open([]);
-          break;
-      }
-    },
-    changeCertificationType(value) {
-      this.form.certificationType = value;
-      this.form.relationName = '';
-      this.form.relationId = '';
-    },
-    confirmSelection(obj) {
-      this.form.relationId = obj.id
-      this.form.relationName = obj.name
-      this.$forceUpdate();
-    },
-    async getCertificateInfo(row) {
-      this.form = await getProfessionCertificationById(row.id)
-      this.form.date = [this.form.startTime, this.form.endTime]
-    },
-    //打开选择负责人弹窗
-    openStaffSelection(index) {
-      this.curIndex = index
-      this.StaffType = 1
-      this.$refs.staffSelection.open([]);
-    },
-    //选择负责人回调
-    confirmStaffSelection(data, type) {
-      if (this.StaffType == 1) {
-        this.form.detailsList[this.curIndex].noticePersonName = data.map((item) => item.name).toString();
-        this.form.detailsList[this.curIndex].noticePersonId = data.map((item) => item.id).toString();
-      } else {
-        this.form.relationId = data.map((item) => item.id).join(',');
-        this.form.relationName = data.map((item) => item.name).join(',');
-      }
-
-    },
-    //新增
-    handleAdd() {
-      this.form.detailsList.push({...this.defaultData})
-    },
-    //修改资质证书
-    handleChangeType(val, row) {
-      if (!val) return row.name = ''
-      row.name = this.dictList.find(i => i.dictCode == val)?.dictValue || ''
+      },
 
-    },
-    downloadFile(file) {
-      getFile({objectName: file.storePath}, file.name);
-    },
-    //保存/提交
-    handleSave(isSub) {
-      this.$refs.form.validate(async (valid) => {
-        if (!valid) return this.$message.warning('有必填项未填写,请检查')
-        if (!this.form.detailsList.length) return this.$message.warning('至少保存一条资质信息')
-        this.form.startTime = this.form.date[0]
-        this.form.endTime = this.form.date[1]
-        let api = this.type == 'add' ? saveProfessionCertification : updateProfessionCertificationById
-        let id = await api(this.form)
-        if (isSub) {
-          let businessId = this.type == 'add' ? id : this.form.id
-          await contactQcSubmit({businessId: businessId, certificationType: this.form.certificationType})
+      handleClick() {
+        switch (this.form.certificationType) {
+          case '1':
+            this.$refs.clientSelection.open();
+            break;
+          case '2':
+            this.$refs.vendorDialogRef.open();
+            break;
+          case '3':
+            this.StaffType = 2;
+            this.$refs.staffSelection.open([]);
+            break;
         }
-        this.$message.success('保存成功')
-        this.$emit('reload')
-        this.cancel()
-      })
-
-    },
-    //关闭弹窗
-    cancel() {
-      this.$emit('update:addOrEditDialogFlag', false)
-    },
-  }
-
-}
+      },
+      changeCertificationType(value) {
+        this.form.certificationType = value;
+        this.form.relationName = '';
+        this.form.relationId = '';
+      },
+      confirmSelection(obj) {
+        this.form.relationId = obj.id;
+        this.form.relationName = obj.name;
+        this.$forceUpdate();
+      },
+      async getCertificateInfo(row) {
+        this.form = await getProfessionCertificationById(row.id);
+        this.form.date = [this.form.startTime, this.form.endTime];
+      },
+      //打开选择负责人弹窗
+      openStaffSelection(index) {
+        this.curIndex = index;
+        this.StaffType = 1;
+        this.$refs.staffSelection.open([]);
+      },
+      //选择负责人回调
+      confirmStaffSelection(data, type) {
+        if (this.StaffType == 1) {
+          this.form.detailsList[this.curIndex].noticePersonName = data
+            .map((item) => item.name)
+            .toString();
+          this.form.detailsList[this.curIndex].noticePersonId = data
+            .map((item) => item.id)
+            .toString();
+        } else {
+          this.form.relationId = data.map((item) => item.id).join(',');
+          this.form.relationName = data.map((item) => item.name).join(',');
+        }
+      },
+      //新增
+      handleAdd() {
+        this.form.detailsList.push({ ...this.defaultData });
+      },
+      //修改资质证书
+      handleChangeType(val, row) {
+        if (!val) return (row.name = '');
+        row.name =
+          this.dictList.find((i) => i.dictCode == val)?.dictValue || '';
+      },
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      },
+      //保存/提交
+      handleSave(isSub) {
+        this.$refs.form.validate(async (valid) => {
+          if (!valid) return this.$message.warning('有必填项未填写,请检查');
+          if (!this.form.detailsList.length)
+            return this.$message.warning('至少保存一条资质信息');
+          this.form.startTime = this.form.date[0];
+          this.form.endTime = this.form.date[1];
+          let api =
+            this.type == 'add'
+              ? saveProfessionCertification
+              : updateProfessionCertificationById;
+          let id = await api(this.form);
+          if (isSub) {
+            let businessId = this.type == 'add' ? id : this.form.id;
+            await contactQcSubmit({
+              businessId: businessId,
+              certificationType: this.form.certificationType
+            });
+          }
+          this.$message.success('保存成功');
+          this.$emit('reload');
+          this.cancel();
+        });
+      },
+      //关闭弹窗
+      cancel() {
+        this.$emit('update:addOrEditDialogFlag', false);
+      }
+    }
+  };
 </script>
 <style scoped lang="scss">
-:deep.el-form-item {
-  margin-bottom: 0
-}
+  :deep.el-form-item {
+    margin-bottom: 0;
+  }
 </style>

+ 32 - 18
src/views/bpm/handleTask/components/contactQC/contactDetailDialog.vue

@@ -28,7 +28,7 @@
                 {{ otherForm.salesmanName }}
               </el-form-item>
             </el-col>
-      
+
             <el-col :span="8">
               <el-form-item label="客户名称:" prop="name">
                 {{ form.name }}
@@ -60,7 +60,7 @@
                 {{ form.authorizationLimit }}
               </el-form-item>
             </el-col>
-     
+
             <el-col :span="8">
               <el-form-item label="单位电话:" prop="phone">
                 {{ form.phone }}
@@ -76,7 +76,7 @@
                 {{ form.address }}
               </el-form-item>
             </el-col>
- 
+
             <el-col :span="8">
               <el-form-item
                 label="统一社会信用代码:"
@@ -87,18 +87,31 @@
             </el-col>
             <el-col :span="24">
               <el-form-item label="注册地址:" prop="addressId">
-                <el-input v-model="form.addressName" disabled style="width: 35%;"></el-input>
-                <el-input v-model="form.address" disabled style="width: 65%;"></el-input>
+                <el-input
+                  v-model="form.addressName"
+                  disabled
+                  style="width: 35%"
+                ></el-input>
+                <el-input
+                  v-model="form.address"
+                  disabled
+                  style="width: 65%"
+                ></el-input>
               </el-form-item>
             </el-col>
-   
-          
-    
-       
-          <el-col :span="24">
+
+            <el-col :span="24">
               <el-form-item label="联系地址:" prop="addressId">
-                <el-input v-model="otherForm.addressName" disabled style="width: 35%;"></el-input>
-                <el-input v-model="otherForm.address" disabled style="width: 65%;"></el-input>
+                <el-input
+                  v-model="otherForm.addressName"
+                  disabled
+                  style="width: 35%"
+                ></el-input>
+                <el-input
+                  v-model="otherForm.address"
+                  disabled
+                  style="width: 65%"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -111,7 +124,7 @@
                 {{ form.companyCategoryName }}
               </el-form-item>
             </el-col>
-     
+
             <el-col :span="8">
               <el-form-item label="企业类型:" prop="companyCategoryId">
                 {{ form.enterpriseTypeName }}
@@ -127,7 +140,7 @@
                 {{ form.businessScope }}
               </el-form-item>
             </el-col>
-    
+
             <el-col :span="8">
               <el-form-item label="主营产品:" prop="mainProduct">
                 {{ form.mainProduct }}
@@ -139,7 +152,6 @@
               </el-form-item>
             </el-col>
 
-
             <el-col :span="16">
               <el-form-item label="备注:" prop="remark">
                 {{ form.remark }}
@@ -344,8 +356,9 @@
 <script>
   import {
     contactDetail,
-    getByIds
+    getInfoByIds
   } from '@/api/bpm/components/saleManage/contact';
+
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
   import { copyObj } from '@/utils/util';
@@ -663,8 +676,9 @@
           this.tableLinkData.forEach((e) => (e.status = e.status + ''));
         }
 
-        await getByIds(this.form.categoryId).then((res) => {
-          this.$set(this.form, 'categoryName', res.data.name);
+        await getInfoByIds(this.form.categoryId).then((res) => {
+          let categoryName = res.data.map((item) => item.name)?.join(',');
+          this.$set(this.form, 'categoryName', categoryName);
         });
       },
 

+ 1 - 12
src/views/bpm/handleTask/components/purchaseOrder/invoice/inventoryTable.vue

@@ -29,18 +29,7 @@
           :prop="'datasource.' + $index + '.technicalDrawings'"
         >
           <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
-          <!--          <div v-if="row.technicalDrawings && row.technicalDrawings?.length">-->
-          <!--            <el-link-->
-          <!--              v-for="link in row.technicalDrawings"-->
-          <!--              :key="link.id"-->
-          <!--              type="primary"-->
-          <!--              :underline="false"-->
-          <!--              @click="downloadFile(link)"-->
-          <!--            >-->
-          <!--              {{ link.name }}-->
-          <!--            </el-link-->
-          <!--            >-->
-          <!--          </div>-->
+          
         </el-form-item>
       </template>
       <template v-slot:remark="{ row, $index }">

+ 5 - 59
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -54,17 +54,7 @@
               style="margin-bottom: 16px"
             >
               <fileMain v-model="detailData.sendFiles" type="view"></fileMain>
-              <!--              <div v-if="detailData.sendFiles && detailData.sendFiles?.length">-->
-              <!--                <el-link-->
-              <!--                  v-for="link in detailData.sendFiles"-->
-              <!--                  :key="link.id"-->
-              <!--                  type="primary"-->
-              <!--                  :underline="false"-->
-              <!--                  @click="downloadFile(link)"-->
-              <!--                >-->
-              <!--                  {{ link.name }}</el-link-->
-              <!--                >-->
-              <!--              </div>-->
+            
             </el-form-item>
             <el-form-item
               label="回执附件:"
@@ -75,21 +65,7 @@
                 v-model="detailData.repliedFiles"
                 type="view"
               ></fileMain>
-              <!--              <div-->
-              <!--                v-if="-->
-              <!--                  detailData.repliedFiles && detailData.repliedFiles?.length-->
-              <!--                "-->
-              <!--              >-->
-              <!--                <el-link-->
-              <!--                  v-for="link in detailData.repliedFiles"-->
-              <!--                  :key="link.id"-->
-              <!--                  type="primary"-->
-              <!--                  :underline="false"-->
-              <!--                  @click="downloadFile(link)"-->
-              <!--                >-->
-              <!--                  {{ link.name }}</el-link-->
-              <!--                >-->
-              <!--              </div>-->
+             
             </el-form-item>
             <el-form-item label="计价方式:" style="margin-bottom: 22px">
               {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
@@ -174,17 +150,7 @@
             :prop="'datasource.' + $index + '.industryArtFiles'"
           >
             <fileMain v-model="row.industryArtFiles" type="view"></fileMain>
-            <!--            <div v-if="row.industryArtFiles && row.industryArtFiles?.length">-->
-            <!--              <el-link-->
-            <!--                v-for="link in row.industryArtFiles"-->
-            <!--                :key="link.id"-->
-            <!--                type="primary"-->
-            <!--                :underline="false"-->
-            <!--                @click="downloadFile(link)"-->
-            <!--              >-->
-            <!--                {{ link.name }}</el-link-->
-            <!--              >-->
-            <!--            </div>-->
+         
           </el-form-item>
         </template>
         <template v-slot:otherFiles="{ row, $index }">
@@ -193,32 +159,12 @@
             :prop="'datasource.' + $index + '.otherFiles'"
           >
             <fileMain v-model="row.otherFiles" type="view"></fileMain>
-            <!--            <div v-if="row.otherFiles && row.otherFiles?.length">-->
-            <!--              <el-link-->
-            <!--                v-for="link in row.otherFiles"-->
-            <!--                :key="link.id"-->
-            <!--                type="primary"-->
-            <!--                :underline="false"-->
-            <!--                @click="downloadFile(link)"-->
-            <!--              >-->
-            <!--                {{ link.name }}</el-link-->
-            <!--              >-->
-            <!--            </div>-->
+           
           </el-form-item>
         </template>
         <template v-slot:technicalDrawings="{ row }">
           <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
-          <!--          <div v-if="row.technicalDrawings && row.technicalDrawings?.length">-->
-          <!--            <el-link-->
-          <!--              v-for="link in row.technicalDrawings"-->
-          <!--              :key="link.id"-->
-          <!--              type="primary"-->
-          <!--              :underline="false"-->
-          <!--              @click="downloadFile(link)"-->
-          <!--            >-->
-          <!--              {{ link.name }}</el-link-->
-          <!--            >-->
-          <!--          </div>-->
+       
         </template>
       </ele-pro-table>
     </div>

+ 0 - 7
src/views/bpm/handleTask/components/saleOrder/invoice/inventoryTable.vue

@@ -394,13 +394,6 @@
             headerSlot: 'headerWarehouseId',
             align: 'center'
           },
-          {
-            width: 100,
-            prop: 'stockLedger',
-            label: '发货明细',
-            slot: 'stockLedger',
-            align: 'center'
-          },
           {
             width: 120,
             prop: 'totalCount',

+ 16 - 20
src/views/bpm/handleTask/components/saleOrder/returnGoods/addReturnGoodsDialog.vue

@@ -31,12 +31,7 @@
             >
             </DictSelection>
           </el-form-item>
-          <!-- <el-form-item label="计价方式" style="margin-bottom: 22px">
-            <el-select v-model="form.pricingWay" disabled style="width: 100%">
-              <el-option label="按数量计费" :value="1"></el-option>
-              <el-option label="按重量计费" :value="2"></el-option>
-            </el-select>
-          </el-form-item> -->
+
           <el-form-item label="总金额:" prop="totalAmount">
             <el-input v-model="totalAmount" disabled>
               <template slot="append">元</template>
@@ -274,20 +269,21 @@
             align: 'center'
           },
           {
-            width: 100,
-            prop: 'stockLedger',
-            label: '发货明细',
-            slot: 'stockLedger',
-            align: 'center'
-          },
-
-          {
-            width: 120,
-            prop: 'totalCount',
-            label: '数量',
-            slot: 'totalCount',
-            align: 'center'
-          },
+          width: 120,
+          prop: 'totalCount',
+          label: '发货数量',
+          slot: 'totalCount',
+          headerSlot: 'headerTotalCount',
+          align: 'center'
+        },
+        {
+          width: 120,
+          prop: 'orderTotalCount',
+          label: '订单数量',
+          slot: 'orderTotalCount',
+          align: 'center',
+          // show: !!!this.entrustedCode
+        },
           {
             width: 120,
             prop: 'measuringUnit',

+ 36 - 28
src/views/bpm/handleTask/components/saleOrder/returnGoods/detailDialog.vue

@@ -89,15 +89,14 @@
             prop="returnFiles"
             style="margin-bottom: 16px"
           >
-          <fileMain v-model="form.returnFiles" type="view"></fileMain>
-            
+            <fileMain v-model="form.returnFiles" type="view"></fileMain>
           </el-form-item>
           <el-form-item
             label="回执附件:"
             prop="sendFiles"
             style="margin-bottom: 16px"
           >
-          <fileMain v-model="form.sendFiles" type="view"></fileMain>
+            <fileMain v-model="form.sendFiles" type="view"></fileMain>
           </el-form-item>
         </el-col>
       </el-row>
@@ -111,7 +110,7 @@
       :datasource="productList"
       row-key="id"
     >
-    <template v-slot:technicalDrawings="{ row }">
+      <template v-slot:technicalDrawings="{ row }">
         <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
       </template>
     </ele-pro-table>
@@ -141,7 +140,6 @@
       ref="inventoryTabledetailRef"
       :isDiscount="false"
       :isAllPrice="false"
-
     ></inventoryTabledetail>
     <inventoryTable
       v-if="
@@ -151,12 +149,14 @@
       :isProduceDeliveryDeadline="taskDefinitionKey == 'produceLeader'"
       :isDiscount="false"
     ></inventoryTable>
-    
   </div>
 </template>
 
 <script>
-  import { getReturnSaleOrderrecordDetail,getSendSaleOrderrecordDetail } from '@/api/bpm/components/saleManage/saleorder';
+  import {
+    getReturnSaleOrderrecordDetail,
+    getSendSaleOrderrecordDetail
+  } from '@/api/bpm/components/saleManage/saleorder';
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
   import { reviewStatusEnum } from '@/enum/dict';
@@ -164,12 +164,12 @@
   import inventoryTable from '@/BIZComponents/inventoryTable.vue';
   import fileMain from '@/components/addDoc/index.vue';
 
-
   export default {
     mixins: [dictMixins],
     components: {
       inventoryTabledetail,
-      inventoryTable,fileMain
+      inventoryTable,
+      fileMain
     },
     data() {
       return {
@@ -259,19 +259,20 @@
             align: 'center'
           },
           {
-            width: 100,
-            prop: 'stockLedger',
-            label: '发货明细',
-            slot: 'stockLedger',
+            width: 120,
+            prop: 'totalCount',
+            label: '发货数量',
+            slot: 'totalCount',
+            headerSlot: 'headerTotalCount',
             align: 'center'
           },
-
           {
             width: 120,
-            prop: 'totalCount',
-            label: '数量',
-            slot: 'totalCount',
+            prop: 'orderTotalCount',
+            label: '订单数量',
+            slot: 'orderTotalCount',
             align: 'center'
+            // show: !!!this.entrustedCode
           },
           {
             width: 120,
@@ -324,8 +325,11 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
           {
@@ -406,7 +410,7 @@
             prop: 'technicalDrawings',
             label: '技术图纸',
             slot: 'technicalDrawings',
-          
+
             align: 'center'
           },
           {
@@ -419,7 +423,7 @@
             formatter: (row, column) => {
               return row.provenance && row.provenance.length
                 ? row.provenance
-                    .map((item) => this.getDictValue('产地', item ))
+                    .map((item) => this.getDictValue('产地', item))
                     .join(',')
                 : '';
             }
@@ -534,8 +538,11 @@
             slot: 'pricingWay',
             align: 'center',
             formatter: (row, column) => {
-              return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
-
+              return row.pricingWay == 1
+                ? '按数量计费'
+                : row.pricingWay == 2
+                ? '按重量计费'
+                : '';
             }
           },
           {
@@ -557,7 +564,7 @@
             label: '合计',
             align: 'center'
           },
-         
+
           {
             minWidth: 80,
             prop: 'receiveTotalWeight',
@@ -583,7 +590,7 @@
             formatter: (row, column) => {
               return row.provenance && row.provenance.length
                 ? row.provenance
-                    .map((item) => this.getDictValue('产地', item ))
+                    .map((item) => this.getDictValue('产地', item))
                     .join(',')
                 : '';
             }
@@ -617,7 +624,6 @@
     created() {
       this.getDetailData(this.businessId);
       this.requestDict('产地');
-
     },
     methods: {
       downloadFile(file) {
@@ -675,8 +681,10 @@
           this.form.pricingWay = data?.saleOrder?.pricingWay;
           this.$nextTick(() => {
             this.$refs.inventoryTabledetailRef &&
-              this.$refs.inventoryTabledetailRef.putTableValue({productList:data.redressProductList});
-              this.getSendSaleOrderDetail(data.sendId)
+              this.$refs.inventoryTabledetailRef.putTableValue({
+                productList: data.redressProductList
+              });
+            this.getSendSaleOrderDetail(data.sendId);
           });
         }
       }

+ 4 - 14
src/views/bpm/handleTask/components/selectedCollectionOutbound/submit.vue

@@ -40,7 +40,7 @@
         icon="el-icon-circle-close"
         type="danger"
         size="mini"
-        @click="handleAudit(0)"
+        @click="rejectTask(0)"
         >驳回
       </el-button>
 
@@ -98,20 +98,10 @@
       activeCompChange(activeComp) {
         this.activeComp = activeComp;
       },
+      rejectTask(status) {
+        this._approveTaskWithVariables(status);
+      },
       async handleAudit(status) {
-        // console.log(status);
-        // let storemanIds = '';
-        // let permissionType = this.tabOptions.find(
-        //   (item) => item.key == this.taskDefinitionKey
-        // )?.permissionType;
-        // if (this.taskDefinitionKey === 'deptLeaderApprove') {
-        //   let arr = await this.getTableValue();
-        //   let ids = arr.productList.map((item) => item.warehouseId);
-        //   let data = await getWarehouseListByIds(ids || []);
-        //   storemanIds = [...new Set(data.map((item) => item.ownerId))].join(
-        //     ','
-        //   );
-        // }
         let data = await this.getTableValue();
         let storageData = data.returnStorageData;
         if (!!status) {

+ 411 - 335
src/views/bpm/handleTask/components/supplierManage/certificateQualificationsDialog.vue

@@ -1,124 +1,172 @@
 <template>
-  <ele-modal custom-class="ele-dialog-form long-dialog-form"
-             :centered="true" :visible.sync="certificateQualificationsDialogFlag" :title="title"
-             append-to-body
-             :close-on-click-modal="false" width="80%" :before-close="cancel">
-
+  <ele-modal
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    :visible.sync="certificateQualificationsDialogFlag"
+    :title="title"
+    append-to-body
+    :close-on-click-modal="false"
+    width="80%"
+    :before-close="cancel"
+  >
     <el-form ref="form" :model="form">
-      <headerTitle title="基本信息"/>
+      <headerTitle title="基本信息" />
       <el-row :gutter="20">
         <el-col :span="12">
-          <el-form-item label-width="50px" label="名称" prop="name"
-                        :rules=" {required: true, message: '请输入',trigger: 'blur' }">
-            <el-input v-model="form.name" :disabled="type=='view'" clearable></el-input>
+          <el-form-item
+            label-width="50px"
+            label="名称"
+            prop="name"
+            :rules="{ required: true, message: '请输入', trigger: 'blur' }"
+          >
+            <el-input
+              v-model="form.name"
+              :disabled="type == 'view'"
+              clearable
+            ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
           <el-form-item label-width="50px" label="备注">
-            <el-input type="textarea" v-model="form.remark" :disabled="type=='view'" clearable></el-input>
+            <el-input
+              type="textarea"
+              v-model="form.remark"
+              :disabled="type == 'view'"
+              clearable
+            ></el-input>
           </el-form-item>
         </el-col>
       </el-row>
-      <headerTitle title="资质信息"/>
-      <ele-pro-table ref="linkTable" :columns="columns" :datasource="form.detailsList" :toolkit="[]" height="300px"
-                     :need-page="false">
+      <headerTitle title="资质信息" />
+      <ele-pro-table
+        ref="linkTable"
+        :columns="columns"
+        :datasource="form.detailsList"
+        :toolkit="[]"
+        height="300px"
+        :need-page="false"
+      >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
-
-          <el-button v-if="type!=='view'" type="primary" @click="handleAdd">添加</el-button>
+          <el-button v-if="type !== 'view'" type="primary" @click="handleAdd"
+            >添加</el-button
+          >
         </template>
         <template v-slot:name="scope">
-          <el-form-item :prop="'detailsList.' + scope.$index + '.name'" :rules="{
-            required: true,
-            message: '',
-            trigger: 'change'
-          }">
-            <el-select v-if="type!=='view'" v-model="scope.row.name" clearable
-                       @change="(val)=>handleChangeType(val,scope.row)">
-              <el-option :disabled="disabledToType(scope.row).includes(item.dictCode)"
-                         v-for="item in dictList" :value="item.dictValue"
-                         :label="item.dictValue"></el-option>
+          <el-form-item
+            :prop="'detailsList.' + scope.$index + '.name'"
+            :rules="{
+              required: true,
+              message: '',
+              trigger: 'change'
+            }"
+          >
+            <el-select
+              v-if="type !== 'view'"
+              v-model="scope.row.name"
+              clearable
+              @change="(val) => handleChangeType(val, scope.row)"
+            >
+              <el-option
+                :disabled="disabledToType(scope.row).includes(item.dictCode)"
+                v-for="item in dictList"
+                :value="item.dictValue"
+                :label="item.dictValue"
+              ></el-option>
             </el-select>
             <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
             <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
-            <span v-else>{{ scope.row.name}}</span>
+            <span v-else>{{ scope.row.name }}</span>
           </el-form-item>
-
         </template>
         <template v-slot:code="scope">
-          <el-form-item :prop="'detailsList.' + scope.$index + '.code'" :rules="{
-            required: true,
-            message: '',
-            trigger: 'blur'
-          }">
-            <el-input v-model="scope.row.code" :disabled="type=='view'" clearable></el-input>
+          <el-form-item
+            :prop="'detailsList.' + scope.$index + '.code'"
+          
+          >
+            <el-input
+              v-model="scope.row.code"
+              :disabled="type == 'view'"
+              clearable
+            ></el-input>
           </el-form-item>
-
         </template>
         <template v-slot:businessRange="scope">
-          <el-form-item :prop="'detailsList.' + scope.$index + '.businessRange'">
-            <el-input type="textarea" v-model="scope.row.businessRange" :disabled="type=='view'" clearable></el-input>
+          <el-form-item
+            :prop="'detailsList.' + scope.$index + '.businessRange'"
+          >
+            <el-input
+              type="textarea"
+              v-model="scope.row.businessRange"
+              :disabled="type == 'view'"
+              clearable
+            ></el-input>
           </el-form-item>
         </template>
         <template v-slot:startTime="scope">
-          <el-form-item inline-message :prop="'detailsList.' + scope.$index + '.startTime'" :rules="{
-            required: false,
-            message: '',
-            trigger: 'change'
-
-          }">
+          <el-form-item
+            inline-message
+            :prop="'detailsList.' + scope.$index + '.startTime'"
+            :rules="{
+              required: false,
+              message: '',
+              trigger: 'change'
+            }"
+          >
             <el-date-picker
-              :disabled="type=='view'"
+              :disabled="type == 'view'"
               v-model="scope.row.startTime"
               type="date"
               style="width: 100%"
               value-format="yyyy-MM-dd"
-              placeholder="选择日期">
+              placeholder="选择日期"
+            >
             </el-date-picker>
           </el-form-item>
-
         </template>
         <template v-slot:endTime="scope">
-          <el-form-item :prop="'detailsList.' + scope.$index + '.endTime'"
-                        :rules="{
-            required: false,
-            validator: validateEndDate(scope.row,scope.$index),
-            trigger: ['blur','change']
-          }">
+          <el-form-item
+            :prop="'detailsList.' + scope.$index + '.endTime'"
+            :rules="{
+              required: false,
+              validator: validateEndDate(scope.row, scope.$index),
+              trigger: ['blur', 'change']
+            }"
+          >
             <el-date-picker
-              :disabled="type=='view'"
+              :disabled="type == 'view'"
               v-model="scope.row.endTime"
               type="date"
               style="width: 100%"
               value-format="yyyy-MM-dd"
-              placeholder="选择日期">
+              placeholder="选择日期"
+            >
             </el-date-picker>
           </el-form-item>
-
         </template>
         <template v-slot:noticePersonName="scope">
-          <el-form-item :prop="'detailsList.' + scope.$index + '.noticePersonName'" :rules="{
-            required: true,
-            message: '',
-            trigger: ['blur','change']
-
-          }">
+          <el-form-item
+            :prop="'detailsList.' + scope.$index + '.noticePersonName'"
+          
+          >
             <el-input
-              :disabled="type=='view'"
+              :disabled="type == 'view'"
               @click.native="openStaffSelection(scope.$index)"
               v-model="scope.row.noticePersonName"
               placeholder="请选择"
             ></el-input>
           </el-form-item>
-
         </template>
         <template v-slot:accessory="scope">
-          <el-form-item :prop="'detailsList.' + scope.$index + '.accessory'" :rules="{
-            required: true,
-            message: '',
-            trigger: ['change','blur']
-          }">
-            <fileMain v-model="scope.row.accessory"  :type="type"></fileMain>
+          <el-form-item
+            :prop="'detailsList.' + scope.$index + '.accessory'"
+            :rules="{
+              required: true,
+              message: '',
+              trigger: ['change', 'blur']
+            }"
+          >
+            <fileMain v-model="scope.row.accessory" :type="type"></fileMain>
             <!--                <fileUpload-->
             <!--                  v-if="type!=='view'"-->
             <!--                  v-model="scope.row.accessory"-->
@@ -136,39 +184,58 @@
             <!--                  </el-link>-->
             <!--                </div>-->
           </el-form-item>
-
         </template>
         <template v-slot:type="scope">
           <el-form-item :prop="'detailsList.' + scope.$index + '.type'">
-            <el-select v-if="type!=='view'" v-model="scope.row.type" clearable>
-              <el-option v-for="item in typeList" :value="item.dictCode"
-                         :label="item.dictValue"></el-option>
+            <el-select
+              v-if="type !== 'view'"
+              v-model="scope.row.type"
+              clearable
+            >
+              <el-option
+                v-for="item in typeList"
+                :value="item.dictCode"
+                :label="item.dictValue"
+              ></el-option>
             </el-select>
             <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
             <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
-            <span v-else>{{ getLabelName(typeList,scope.row.type)  }}</span>
+            <span v-else>{{ getLabelName(typeList, scope.row.type) }}</span>
           </el-form-item>
-
         </template>
         <template v-slot:level="scope">
           <el-form-item :prop="'detailsList.' + scope.$index + '.level'">
-            <el-select v-if="type!=='view'" v-model="scope.row.level" clearable>
-              <el-option v-for="item in levelOptions" :value="item.dictCode"
-                         :label="item.dictValue"></el-option>
+            <el-select
+              v-if="type !== 'view'"
+              v-model="scope.row.level"
+              clearable
+            >
+              <el-option
+                v-for="item in levelOptions"
+                :value="item.dictCode"
+                :label="item.dictValue"
+              ></el-option>
             </el-select>
             <!--                <DictSelection v-if="type!=='view'" clearable dictName="客户/供应商资质类型" v-model="scope.row.type"-->
             <!--                               @itemChange="(val)=>handleChangeType(val,scope.row)"></DictSelection>-->
-            <span v-else>{{ getLabelName(levelOptions,scope.row.type)  }}</span>
+            <span v-else>{{ getLabelName(levelOptions, scope.row.type) }}</span>
           </el-form-item>
         </template>
         <template v-slot:remark="scope">
           <el-form-item :prop="'detailsList.' + scope.$index + '.remark'">
-            <el-input type="textarea" :disabled="type=='view'" v-model="scope.row.remark"></el-input>
+            <el-input
+              type="textarea"
+              :disabled="type == 'view'"
+              v-model="scope.row.remark"
+            ></el-input>
           </el-form-item>
         </template>
         <template v-slot:status="scope">
           <el-form-item :prop="'detailsList.' + scope.$index + '.status'">
-            <el-tag v-if="scope.row.status" :type="statusTagTypeList[scope.row.status]">
+            <el-tag
+              v-if="scope.row.status"
+              :type="statusTagTypeList[scope.row.status]"
+            >
               {{ statusList[scope.row.status] }}
             </el-tag>
           </el-form-item>
@@ -184,7 +251,7 @@
           >
             <template v-slot:reference>
               <el-link
-                v-if="type!=='view'"
+                v-if="type !== 'view'"
                 type="danger"
                 :underline="false"
                 icon="el-icon-delete"
@@ -194,12 +261,15 @@
             </template>
           </el-popconfirm>
         </template>
-
       </ele-pro-table>
-
     </el-form>
     <div slot="footer">
-      <el-button type="primary" v-if="type!=='view'" @click="handleSave(false)">保存</el-button>
+      <el-button
+        type="primary"
+        v-if="type !== 'view'"
+        @click="handleSave(false)"
+        >保存</el-button
+      >
       <!--      <el-button type="primary" v-if="type!=='view'" plan @click="handleSave(true)">提交</el-button>-->
       <el-button @click="cancel">返回</el-button>
     </div>
@@ -207,273 +277,279 @@
       ref="staffSelection"
       @confirm="confirmStaffSelection"
     ></staffSelection>
-
   </ele-modal>
 </template>
 <script>
-import FileUpload from "@/components/upload/fileUpload.vue";
-import staffSelection from "@/components/staffSelection/staffSelection.vue";
-import {
-  contactQcPackDetailAPI,
-  contactQcPackSaveAPI,
-  contactQcPackUpdateAPI,
-  contactQcSubmit
-} from "@/api/bpm/components/supplierManage/contact";
-import {getFile} from "@/api/system/file";
-import {mapActions, mapGetters} from "vuex";
-import dictEnum from "@/enum/dict";
-import fileMain from "@/components/addDoc/index.vue";
+  import FileUpload from '@/components/upload/fileUpload.vue';
+  import staffSelection from '@/components/staffSelection/staffSelection.vue';
+  import {
+    contactQcPackDetailAPI,
+    contactQcPackSaveAPI,
+    contactQcPackUpdateAPI,
+    contactQcSubmit
+  } from '@/api/bpm/components/supplierManage/contact';
+  import { getFile } from '@/api/system/file';
+  import { mapActions, mapGetters } from 'vuex';
+  import dictEnum from '@/enum/dict';
+  import fileMain from '@/components/addDoc/index.vue';
 
-export default {
-  name: "certificateQualificationsDialog",
-  components: {fileMain, FileUpload, staffSelection},
-  props: {
-    certificateQualificationsDialogFlag: Boolean,
-    contactId: String,
-    typeInfo: String,
-  },
-  computed: {
-    ...mapGetters(['dict']),
-    dictList() {
-      return this.dict[dictEnum['客户/供应商资质类型']] || [];
+  export default {
+    name: 'certificateQualificationsDialog',
+    components: { fileMain, FileUpload, staffSelection },
+    props: {
+      certificateQualificationsDialogFlag: Boolean,
+      contactId: String,
+      typeInfo: String
     },
-    typeList() {
-      return this.dict[dictEnum['工种类型']] || [];
+    computed: {
+      ...mapGetters(['dict']),
+      dictList() {
+        return this.dict[dictEnum['客户/供应商资质类型']] || [];
+      },
+      typeList() {
+        return this.dict[dictEnum['工种类型']] || [];
+      },
+      columns() {
+        return [
+          {
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            label: '名称',
+            prop: 'name',
+            slot: 'name',
+            headerSlot: 'isRequired',
+            minWidth: 180,
+            align: 'center'
+          },
+          {
+            label: '编号',
+            prop: 'code',
+            slot: 'code',
+            // headerSlot: 'isRequired',
+            minWidth: 120,
+            align: 'center'
+          },
+          {
+            label: '许可/经营范围',
+            prop: 'businessRange',
+            slot: 'businessRange',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '有效期起始日期',
+            prop: 'startTime',
+            slot: 'startTime',
+            // headerSlot: 'isRequired',
+            minWidth: 160,
+            align: 'center'
+          },
+          {
+            label: '有效期截止日期',
+            prop: 'endTime',
+            slot: 'endTime',
+            // headerSlot: 'isRequired',
+            minWidth: 160,
+            align: 'center'
+          },
+          {
+            label: '通知人',
+            prop: 'noticePersonName',
+            slot: 'noticePersonName',
+            // headerSlot: 'isRequired',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '附件',
+            prop: 'accessory',
+            slot: 'accessory',
+            headerSlot: 'isRequired',
+            minWidth: 140
+          },
+          {
+            label: '等级',
+            prop: 'level',
+            slot: 'level',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '分类',
+            prop: 'type',
+            slot: 'type',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '备注',
+            prop: 'remark',
+            slot: 'remark',
+            minWidth: 140,
+            align: 'center'
+          },
+          {
+            label: '状态',
+            prop: 'status',
+            slot: 'status',
+            align: 'center'
+          },
+          {
+            action: 'action',
+            slot: 'action',
+            label: '操作',
+            align: 'center',
+            fixed: 'right'
+          }
+        ];
+      },
+      disabledToType() {
+        return (row) => {
+          let list = this.form.detailsList.map((item) => item.type);
+          let dictCodeList = this.dictList.map((item) => item.dictCode);
+          let intersectionList = list.filter(
+            (v) => dictCodeList.indexOf(v) > -1
+          );
+          intersectionList = intersectionList.filter((v) => row.type !== v);
+          return intersectionList;
+        };
+      }
     },
-    columns() {
-      return [
-        {
-          type: 'index',
-          width: 55,
-          align: 'center'
-        },
-        {
-          label: '名称',
-          prop: 'name',
-          slot: 'name',
-          headerSlot: 'isRequired',
-          minWidth: 180,
-          align: 'center'
-        },
-        {
-          label: '编号',
-          prop: 'code',
-          slot: 'code',
-          headerSlot: 'isRequired',
-          minWidth: 120,
-          align: 'center'
-        },
-        {
-          label: '许可/经营范围',
-          prop: 'businessRange',
-          slot: 'businessRange',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '有效期起始日期',
-          prop: 'startTime',
-          slot: 'startTime',
-          // headerSlot: 'isRequired',
-          minWidth: 160,
-          align: 'center'
-        },
-        {
-          label: '有效期截止日期',
-          prop: 'endTime',
-          slot: 'endTime',
-          // headerSlot: 'isRequired',
-          minWidth: 160,
-          align: 'center'
-        },
-        {
-          label: '通知人',
-          prop: 'noticePersonName',
-          slot: 'noticePersonName',
-          headerSlot: 'isRequired',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '附件',
-          prop: 'accessory',
-          slot: 'accessory',
-          headerSlot: 'isRequired',
-          minWidth: 140,
-        },
-        {
-          label: '等级',
-          prop: 'level',
-          slot: 'level',
-          minWidth: 140,
-          align: 'center'
-        },
-        {
-          label: '分类',
-          prop: 'type',
-          slot: 'type',
-          minWidth: 140,
-          align: 'center'
+    created() {
+      this.requestDict('客户/供应商资质类型');
+    },
+    data() {
+      return {
+        title: '',
+        type: '',
+        defaultData: {
+          files: [],
+          name: '',
+          notifyUserId: '',
+          notifyUserName: '',
+          num: '',
+          remark: '',
+          scope: '',
+          type: '',
+          validityPeriodEnd: '',
+          validityPeriodStart: ''
         },
-        {
-          label: '备注',
-          prop: 'remark',
-          slot: 'remark',
-          minWidth: 140,
-          align: 'center'
+        form: {
+          detailsList: [],
+          contactId: '',
+          name: '',
+          remark: ''
         },
-        {
-          label: '状态',
-          prop: 'status',
-          slot: 'status',
-          align: 'center',
+        curIndex: null,
+        statusList: {
+          10: '有效',
+          20: '无效',
+          30: '已过期'
         },
-        {
-          action: 'action',
-          slot: 'action',
-          label: '操作',
-          align: 'center',
-          fixed:'right'
+        statusTagTypeList: {
+          10: 'success',
+          20: 'info',
+          30: 'danger'
         }
-      ]
+      };
     },
-    disabledToType() {
-      return (row) => {
-        let list = this.form.detailsList.map(item => item.type)
-        let dictCodeList = this.dictList.map(item => item.dictCode)
-        let intersectionList = list.filter((v) => dictCodeList.indexOf(v) > -1)
-        intersectionList = intersectionList.filter(v => row.type !== v)
-        return intersectionList
-      }
-    },
-  },
-  created() {
-    this.requestDict('客户/供应商资质类型');
-  },
-  data() {
-    return {
-      title: '',
-      type: '',
-      defaultData: {
-        files: [],
-        name: "",
-        notifyUserId: "",
-        notifyUserName: "",
-        num: "",
-        remark: "",
-        scope: "",
-        type: "",
-        validityPeriodEnd: "",
-        validityPeriodStart: ""
+    methods: {
+      ...mapActions('dict', ['requestDict']),
+      getLabelName(arr, id) {
+        if (!id) return '';
+        return arr.find((item) => item.dictCode == id)?.dictValue;
       },
-      form: {
-        detailsList: [],
-        contactId: '',
-        name: '',
-        remark: '',
-
+      //结束日期验证
+      validateEndDate(row, index) {
+        return (rule, value, callback) => {
+          if (!value) return callback(new Error(''));
+          if (
+            row.validityPeriodEnd &&
+            row.validityPeriodStart &&
+            value < row.validityPeriodStart
+          ) {
+            callback(new Error('截止日期不能小于起始日期'));
+          } else {
+            callback();
+          }
+        };
       },
-      curIndex: null,
-      statusList : {
-        10: '有效',
-        20: '无效',
-        30: '已过期',
+      //页面初始化
+      init(type, row = {}) {
+        this.title =
+          type == 'add' ? '新增' : type == 'update' ? '修改' : '详情';
+        this.type = type;
+        if (type !== 'add') {
+          this.getCertificateInfo(row);
+        }
       },
-      statusTagTypeList : {
-        10: 'success',
-        20: 'info',
-        30: 'danger',
+      async getCertificateInfo(row) {
+        this.form = await contactQcPackDetailAPI(row.id);
       },
-    }
-  },
-  methods: {
-    ...mapActions('dict', ['requestDict']),
-    getLabelName(arr,id){
-      if(!id) return ''
-      return arr.find(item=>item.dictCode == id)?.dictValue
-    },
-    //结束日期验证
-    validateEndDate(row, index) {
-      return (rule, value, callback) => {
-        if (!value) return callback(new Error(''))
-        if (
-          row.validityPeriodEnd &&
-          row.validityPeriodStart &&
-          value < row.validityPeriodStart
-        ) {
-          callback(new Error('截止日期不能小于起始日期'))
-        } else {
-          callback()
-        }
-      }
-    },
-    //页面初始化
-    init(type, row = {}) {
-      this.title = type == 'add' ? '新增' : type == 'update' ? '修改' : '详情'
-      this.type = type
-      if (type !== 'add') {
-        this.getCertificateInfo(row)
-      }
-    },
-    async getCertificateInfo(row) {
-      this.form = await contactQcPackDetailAPI(row.id)
-    },
-    //打开选择负责人弹窗
-    openStaffSelection(index) {
-      this.curIndex = index
-      this.$refs.staffSelection.open([]);
-    },
-    //选择负责人回调
-    confirmStaffSelection(data) {
-      this.form.detailsList[this.curIndex].notifyUserName = data.map((item) => item.name).toString();
-      this.form.detailsList[this.curIndex].notifyUserId = data.map((item) => item.id).toString();
-    },
-    //删除资质
-    handleRemove(index) {
-      this.form.detailsList.splice(index, 1)
-    },
-    //新增
-    handleAdd() {
-      this.form.detailsList.push({...this.defaultData})
-    },
-    //修改资质证书
-    handleChangeType(val, row) {
-      if (!val) return row.name = ''
-      row.name = this.dictList.find(i => i.dictCode == val)?.dictValue || ''
-
-    },
-    downloadFile(file) {
-      getFile({objectName: file.storePath}, file.name);
-    },
-    //保存/提交
-    handleSave(isSub) {
-      if (!this.contactId) return this.$message.success('请保存合同信息后新增资质')
-
-      this.$refs.form.validate(async (valid) => {
-        if (!valid) return this.$message.warning('有必填项未填写,请检查')
-        if (!this.form.detailsList.length) return this.$message.warning('至少保存一条资质信息')
-        this.form.contactId = this.contactId
-        let api = this.type == 'add' ? contactQcPackSaveAPI : contactQcPackUpdateAPI
-        let id = await api(this.form)
-        if (isSub) {
-          await contactQcSubmit({businessId: id, type: this.typeInfo})
-        }
-        this.$message.success('保存成功')
-        this.$emit('reload')
-        this.cancel()
-      })
-
-    },
-    //关闭弹窗
-    cancel() {
-      this.$emit('update:certificateQualificationsDialogFlag', false)
-    },
-  }
+      //打开选择负责人弹窗
+      openStaffSelection(index) {
+        this.curIndex = index;
+        this.$refs.staffSelection.open([]);
+      },
+      //选择负责人回调
+      confirmStaffSelection(data) {
+        this.form.detailsList[this.curIndex].notifyUserName = data
+          .map((item) => item.name)
+          .toString();
+        this.form.detailsList[this.curIndex].notifyUserId = data
+          .map((item) => item.id)
+          .toString();
+      },
+      //删除资质
+      handleRemove(index) {
+        this.form.detailsList.splice(index, 1);
+      },
+      //新增
+      handleAdd() {
+        this.form.detailsList.push({ ...this.defaultData });
+      },
+      //修改资质证书
+      handleChangeType(val, row) {
+        if (!val) return (row.name = '');
+        row.name =
+          this.dictList.find((i) => i.dictCode == val)?.dictValue || '';
+      },
+      downloadFile(file) {
+        getFile({ objectName: file.storePath }, file.name);
+      },
+      //保存/提交
+      handleSave(isSub) {
+        if (!this.contactId)
+          return this.$message.success('请保存合同信息后新增资质');
 
-}
+        this.$refs.form.validate(async (valid) => {
+          if (!valid) return this.$message.warning('有必填项未填写,请检查');
+          if (!this.form.detailsList.length)
+            return this.$message.warning('至少保存一条资质信息');
+          this.form.contactId = this.contactId;
+          let api =
+            this.type == 'add' ? contactQcPackSaveAPI : contactQcPackUpdateAPI;
+          let id = await api(this.form);
+          if (isSub) {
+            await contactQcSubmit({ businessId: id, type: this.typeInfo });
+          }
+          this.$message.success('保存成功');
+          this.$emit('reload');
+          this.cancel();
+        });
+      },
+      //关闭弹窗
+      cancel() {
+        this.$emit('update:certificateQualificationsDialogFlag', false);
+      }
+    }
+  };
 </script>
 <style scoped lang="scss">
-:deep.el-form-item {
-  margin-bottom: 0
-}
+  :deep.el-form-item {
+    margin-bottom: 0;
+  }
 </style>