yusheng 2 лет назад
Родитель
Сommit
1c0cafc203

+ 8 - 0
src/api/classifyManage/index.js

@@ -97,3 +97,11 @@ export async function updateOutInRecord(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+// 质检员反馈
+export async function uploadQualityFile(data) {
+  const res = await request.post(`wms/outin/uploadQualityFile`,data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 1 - 5
src/utils/request.js

@@ -46,13 +46,9 @@ service.interceptors.request.use(
  * 添加响应拦截器
  */
 service.interceptors.response.use(
-
-
-
-  
   (res) => {
     // token 自动续期
-    if (res.data.code == '-1' && res.config?.showErrorToast !== false) {
+    if (res.data.code == '-1' && res.config?.showErrorToast !== false&&res.data.message) {
       Message.error(res.data.message);
     }
     const token = res.headers[TOKEN_HEADER_NAME.toLowerCase()];

+ 43 - 14
src/views/bpm/handleTask/components/inoutBound/detailDialog.vue

@@ -98,6 +98,24 @@
                   > -->
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item
+                  prop="qualityFile"
+                  label="回执附件"
+                  :rules="{
+                    required: true,
+                    trigger: 'blur'
+                  }"
+                >
+                  <fileUpload
+                    v-model="qualityFile"
+                    module="main"
+                    :showLib="false"
+                    :limit="10"
+                  />
+                </el-form-item>
+              </el-col>
+
               <el-col :span="24">
                 <el-form-item label="备注:">
                   <span>{{ infoData.remark }}</span>
@@ -338,10 +356,10 @@
             </el-table-column>
             <el-table-column label="重量" prop="weight">
               <template slot-scope="{ row }">
-                <span v-if="taskDefinitionKey!='qualityInspection'">
+                <span v-if="taskDefinitionKey != 'qualityInspection'">
                   {{ row.weight }}
                 </span>
-                <span v-if="taskDefinitionKey=='qualityInspection'">
+                <span v-if="taskDefinitionKey == 'qualityInspection'">
                   <el-input
                     v-model="row.weight"
                     placeholder="请输入重量"
@@ -366,17 +384,18 @@
             </el-table-column>
 
             <el-table-column label="质检结果" prop="result" width="120">
-              <template slot-scope="{ row }" v-if="taskDefinitionKey!='qualityInspection'">
-                <span v-if="row.result == 0">合格</span>
-                <span v-else-if="row.result == 1">不合格</span>
-                <span v-else>让步接收</span>
-              </template>
-              <template slot-scope="{ row }" v-if="taskDefinitionKey=='qualityInspection'">
+              <template slot-scope="{ row }">
                 <DictSelection
+                  v-if="taskDefinitionKey == 'qualityInspection'"
                   dictName="质检结果"
                   clearable
                   v-model="row.result"
                 />
+                <div v-if="taskDefinitionKey != 'qualityInspection'">
+                  <span v-if="row.result == 0">合格</span>
+                  <span v-else-if="row.result == 1">不合格</span>
+                  <span v-else>让步接收</span>
+                </div>
               </template>
             </el-table-column>
             <el-table-column label="质检状态" prop="status" width="120">
@@ -395,7 +414,11 @@
                 {{ row.createTime }}
               </template>
             </el-table-column>
-            <el-table-column label="操作" width="80" v-if="taskDefinitionKey=='qualityInspection'">
+            <el-table-column
+              label="操作"
+              width="80"
+              v-if="taskDefinitionKey == 'qualityInspection'"
+            >
               <template slot-scope="{ row }">
                 <el-button type="text" @click="packCout(row)"> 提交 </el-button>
               </template>
@@ -500,6 +523,8 @@
   import StatusStep from '@/components/StatusStep/common.vue';
   // import { fileSystemDownload } from '@/utils';
   import outin from '@/api/warehouseManagement/outin';
+  import fileUpload from '@/components/upload/fileUpload';
+
   import {
     getTreeByPid,
     getOutInBySourceBizNo,
@@ -520,7 +545,7 @@
   import { tableHeader } from './common';
   import { mapGetters, mapActions } from 'vuex';
   export default {
-    components: { StatusStep },
+    components: { StatusStep, fileUpload },
     props: {
       businessId: {
         default: ''
@@ -528,8 +553,8 @@
       type: {
         default: ''
       },
-      taskDefinitionKey:{
-        default:''
+      taskDefinitionKey: {
+        default: ''
       }
     },
     data() {
@@ -541,6 +566,7 @@
         codeList: [],
         auditStatus,
         infoData: {},
+        qualityFile: [],
         warehousingMaterialList: [],
         tableData2: [],
         activeName: 'a',
@@ -631,8 +657,11 @@
       },
       //获取质检状态
       getStatus() {
-        console.log(this.detailList,'dasdasd')
-        return this.detailList.filter(item=>item.status==1)
+        return this.detailList.filter((item) => item.status == 1);
+      },
+      //获取回执附件
+      getQualityFile() {
+        return { qualityFile: this.qualityFile, id: this.infoData.id };
       },
       ...mapActions('dict', ['requestDict']),
       getAuditStatus: useDictLabel(auditStatus),

+ 2 - 1
src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue

@@ -375,7 +375,8 @@
       getTableValue() {
         return {
           form: this.form,
-          statusList: (this.$refs.detailDialog && this.$refs.detailDialog.getStatus()) || []
+          statusList: (this.$refs.detailDialog && this.$refs.detailDialog.getStatus()) || [],
+          qualityInspector: (this.$refs.detailDialog && this.$refs.detailDialog.getQualityFile()) || {},
         };
       },
       async getDetailData(id) {

+ 9 - 2
src/views/bpm/handleTask/components/purchaseOrder/invoice/submit.vue

@@ -126,7 +126,7 @@
   } from '@/api/bpm/components/purchasingManage/purchaseorderreceive';
   import { approveTaskWithVariables } from '@/api/bpm/task';
   import { getWarehouseListByIds } from '@/api/bpm/components/saleManage/saleorder';
-  import { getOutInBySourceBizNo } from '@/api/classifyManage';
+  import { getOutInBySourceBizNo,uploadQualityFile } from '@/api/classifyManage';
   import { listAllUserBind } from '@/api/system/organization';
 
   // 流程实例的详情页,可用于审批
@@ -221,11 +221,18 @@
         }
         if (this.taskDefinitionKey === 'qualityInspection') {
           let arr = await this.getTableValue();
-
           if (arr.statusList.length == 0) {
             return this.$message.error('请完成质检!');
           }
         }
+        if (this.taskDefinitionKey === 'qualityInspectionFeedback') {
+          let arr = await this.getTableValue();
+          console.log(arr,'arr.qualityInspector')
+          if (arr.qualityInspector.qualityFile.length == 0) {
+            return this.$message.error('请上传回执附件!');
+          }
+          await uploadQualityFile(arr.qualityInspector)
+        }
         this._approveTaskWithVariables(
           status,
           storemanIds.length > 0

+ 194 - 142
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -1,46 +1,156 @@
 <template>
   <div>
-    <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-      <headerTitle title="发货信息"></headerTitle>
-      <el-row>
-        <el-col :span="12">
-          <el-form-item
-            label="客户名称:"
-            prop="contactName"
-            style="margin-bottom: 16px"
-          >
-            {{ form.contactName }}
-          </el-form-item>
-          <el-form-item
-            label="客户联系人:"
-            prop="linkName"
-            style="margin-bottom: 16px"
-          >
-            {{ form.linkName }}
-          </el-form-item>
-          <el-form-item
-            label="客户电话:"
-            prop="linkPhone"
-            style="margin-bottom: 16px"
+    <div class="switch">
+      <div class="switch_left">
+        <ul>
+          <li
+            v-for="item in tabOptions"
+            :key="item.key"
+            :class="{ active: activeComp == item.key }"
+            @click="changeActive(item)"
           >
-            {{ form.linkPhone }}
-          </el-form-item>
+            {{ item.name }}
+          </li>
+        </ul>
+      </div>
+    </div>
+    <div v-show="activeComp == 'main'">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <headerTitle title="发货信息"></headerTitle>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item
+              label="客户名称:"
+              prop="contactName"
+              style="margin-bottom: 16px"
+            >
+              {{ form.contactName }}
+            </el-form-item>
+            <el-form-item
+              label="客户联系人:"
+              prop="linkName"
+              style="margin-bottom: 16px"
+            >
+              {{ form.linkName }}
+            </el-form-item>
+            <el-form-item
+              label="客户电话:"
+              prop="linkPhone"
+              style="margin-bottom: 16px"
+            >
+              {{ form.linkPhone }}
+            </el-form-item>
 
+            <el-form-item
+              label="客户地址:"
+              prop="partaAddress"
+              style="margin-bottom: 16px"
+            >
+              {{ form.receiveAddress }}
+            </el-form-item>
+            <el-form-item
+              label="发货附件:"
+              prop="sendFiles"
+              style="margin-bottom: 16px"
+            >
+              <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="回执附件:"
+              prop="sendFiles"
+              style="margin-bottom: 16px"
+            >
+              <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-col>
+
+          <el-col :span="12">
+            <el-form-item
+              label="车牌号:"
+              prop="carNo"
+              style="margin-bottom: 16px"
+            >
+              {{ form.carNo }}
+            </el-form-item>
+            <el-form-item
+              label="发货单据编码:"
+              prop="docNo"
+              style="margin-bottom: 16px"
+            >
+              {{ form.docNo }}
+            </el-form-item>
+            <el-form-item
+              label="制单人:"
+              prop="makerName"
+              style="margin-bottom: 16px"
+            >
+              {{ form.makerName }}
+            </el-form-item>
+            <el-form-item prop="orderNo" label="订单编码:">
+              {{ form.orderNo }}
+            </el-form-item>
+            <el-form-item prop="replied" label="是否回执:">
+              {{ form.replied == 1 ? '是' : '否' }}
+            </el-form-item>
+
+            <el-form-item
+              label="审核状态:"
+              prop="reviewStatus"
+              style="margin-bottom: 16px"
+            >
+              {{ reviewStatusEnum[form.reviewStatus]?.label }}
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <headerTitle title="产品清单"></headerTitle>
+      <ele-pro-table
+        ref="table"
+        :needPage="false"
+        :columns="competAnalysisListcolumns"
+        :toolkit="[]"
+        :datasource="detailData.productList"
+        row-key="id"
+      >
+        <!-- <template v-slot:toolbar>
+        <div class="headbox">
+        <span class="amount">总计:{{detailData.totalAmount}}元</span>
+        <span class="amount">应付金额:{{detailData.payAmount}}元</span>
+      </div>
+      </template> -->
+        <template v-slot:industryArtFiles="{ row, $index }">
           <el-form-item
-            label="客户地址:"
-            prop="partaAddress"
-            style="margin-bottom: 16px"
-          >
-            {{ form.receiveAddress }}
-          </el-form-item>
-          <el-form-item
-            label="发货附件:"
-            prop="sendFiles"
-            style="margin-bottom: 16px"
+            style="margin-bottom: 20px"
+            :prop="'datasource.' + $index + '.industryArtFiles'"
           >
-            <div v-if="detailData.sendFiles && detailData.sendFiles?.length">
+            <div v-if="row.industryArtFiles && row.industryArtFiles?.length">
               <el-link
-                v-for="link in detailData.sendFiles"
+                v-for="link in row.industryArtFiles"
                 :key="link.id"
                 type="primary"
                 :underline="false"
@@ -50,16 +160,15 @@
               >
             </div>
           </el-form-item>
+        </template>
+        <template v-slot:otherFiles="{ row, $index }">
           <el-form-item
-            label="回执附件:"
-            prop="sendFiles"
-            style="margin-bottom: 16px"
+            style="margin-bottom: 20px"
+            :prop="'datasource.' + $index + '.otherFiles'"
           >
-            <div
-              v-if="detailData.repliedFiles && detailData.repliedFiles?.length"
-            >
+            <div v-if="row.otherFiles && row.otherFiles?.length">
               <el-link
-                v-for="link in detailData.repliedFiles"
+                v-for="link in row.otherFiles"
                 :key="link.id"
                 type="primary"
                 :underline="false"
@@ -69,71 +178,11 @@
               >
             </div>
           </el-form-item>
-        </el-col>
-
-        <el-col :span="12">
-          <el-form-item
-            label="车牌号:"
-            prop="carNo"
-            style="margin-bottom: 16px"
-          >
-            {{ form.carNo }}
-          </el-form-item>
-          <el-form-item
-            label="发货单据编码:"
-            prop="docNo"
-            style="margin-bottom: 16px"
-          >
-            {{ form.docNo }}
-          </el-form-item>
-          <el-form-item
-            label="制单人:"
-            prop="makerName"
-            style="margin-bottom: 16px"
-          >
-            {{ form.makerName }}
-          </el-form-item>
-          <el-form-item prop="orderNo" label="订单编码:">
-            {{ form.orderNo }}
-          </el-form-item>
-          <el-form-item prop="replied" label="是否回执:">
-            {{ form.replied == 1 ? '是' : '否' }}
-          </el-form-item>
-
-          <el-form-item
-            label="审核状态:"
-            prop="reviewStatus"
-            style="margin-bottom: 16px"
-          >
-            {{ reviewStatusEnum[form.reviewStatus]?.label }}
-          </el-form-item>
-        </el-col>
-      </el-row>
-    </el-form>
-
-    <headerTitle title="产品清单"></headerTitle>
-    <ele-pro-table
-      ref="table"
-      :needPage="false"
-      :columns="competAnalysisListcolumns"
-      :toolkit="[]"
-      :datasource="detailData.productList"
-      row-key="id"
-    >
-      <!-- <template v-slot:toolbar>
-        <div class="headbox">
-        <span class="amount">总计:{{detailData.totalAmount}}元</span>
-        <span class="amount">应付金额:{{detailData.payAmount}}元</span>
-      </div>
-      </template> -->
-      <template v-slot:industryArtFiles="{ row, $index }">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + $index + '.industryArtFiles'"
-        >
-          <div v-if="row.industryArtFiles && row.industryArtFiles?.length">
+        </template>
+        <template v-slot:technicalDrawings="{ row }">
+          <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
             <el-link
-              v-for="link in row.industryArtFiles"
+              v-for="link in row.technicalDrawings"
               :key="link.id"
               type="primary"
               :underline="false"
@@ -142,40 +191,16 @@
               {{ link.name }}</el-link
             >
           </div>
-        </el-form-item>
-      </template>
-      <template v-slot:otherFiles="{ row, $index }">
-        <el-form-item
-          style="margin-bottom: 20px"
-          :prop="'datasource.' + $index + '.otherFiles'"
-        >
-          <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 }">
-        <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>
+        </template>
+      </ele-pro-table>
+    </div>
+
+    <add
+      ref="add"
+      v-if="activeComp == 'outBound'"
+      type="sourceBizNo"
+      @success="success"
+    ></add>
   </div>
 </template>
 
@@ -185,10 +210,17 @@
   import { getSendSaleOrderrecordDetail } from '@/api/bpm/components/saleManage/saleorder';
   import { reviewStatusEnum } from '@/enum/dict';
   import { copyObj } from '@/utils/util';
+  import add from '@/views/bpm/outgoingManagement/add.vue';
+
   export default {
     mixins: [dictMixins],
+    components: {
+      add
+    },
     data() {
       return {
+        activeComp: 'main',
+        tabOptions: [{ key: 'main', name: '发货单详情' }],
         reviewStatusEnum,
         visible: false,
         detailId: '',
@@ -333,12 +365,32 @@
     props: {
       businessId: {
         default: ''
-      }
+      },
+      taskDefinitionKey:{}
     },
     created() {
       this.getDetailData(this.businessId);
+      if (this.taskDefinitionKey == 'storemanApprove') {
+        this.tabOptions.push({ key: 'outBound', name: '出库单' });
+      }
     },
     methods: {
+      changeActive(item) {
+        this.activeComp = item.key;
+        this.$emit('activeCompChange', item.key);
+        if (
+          this.taskDefinitionKey == 'storemanApprove' &&
+          item.key == 'outBound'
+        ) {
+          this.$nextTick(() => {
+            this.$refs.add.eomSuccess(this.form);
+          });
+        }
+      },
+      success() {
+      
+        this.$emit('handleClose');
+      },
       cancel() {
         this.$nextTick(() => {
           // 关闭后,销毁所有的表单数据

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

@@ -196,6 +196,7 @@
         numberReg,
         defaultForm,
         warehouseList: [],
+  
         form: {
           datasource: []
         },

+ 32 - 4
src/views/bpm/handleTask/components/saleOrder/invoice/submit.vue

@@ -24,8 +24,20 @@
         type="success"
         size="mini"
         @click="handleAudit(1)"
+        
         >通过
       </el-button>
+      <el-button
+        icon="el-icon-edit-outline"
+        type="success"
+        size="mini"
+        @click="storemanApprove"
+        v-if="
+          ['storemanApprove'].includes(taskDefinitionKey) &&
+          activeComp == 'outBound'
+        "
+        >申请入库
+      </el-button>
       <el-button
         icon="el-icon-circle-close"
         type="danger"
@@ -67,9 +79,10 @@
 <script>
   import {
     UpdateSendInformation,
-    getWarehouseListByIds
+    getSendSaleOrderrecordDetail
   } from '@/api/bpm/components/saleManage/saleorder';
   import { approveTaskWithVariables } from '@/api/bpm/task';
+  import { getOutInBySourceBizNo } from '@/api/classifyManage';
 
   // 流程实例的详情页,可用于审批
   export default {
@@ -99,11 +112,26 @@
         form: {
           technicianId: '',
           reason: ''
-        }
+        },
+        outInData:{},
+        activeComp: ''
       };
     },
-    created() {},
+    async created() {
+      if (this.taskDefinitionKey == 'storemanApprove') {
+        let data = await getSendSaleOrderrecordDetail(this.businessId);
+        try {
+          this.outInData = await getOutInBySourceBizNo(data.orderNo);
+        } catch (error) {}
+      }
+    },
     methods: {
+      async storemanApprove() {
+        this.$emit('submit');
+      },
+      activeCompChange(activeComp) {
+        this.activeComp = activeComp;
+      },
       /** 处理转办审批人 */
       handleUpdateAssignee() {
         this.$emit('handleUpdateAssignee');
@@ -138,7 +166,7 @@
             return;
           }
         }
-        
+
         if (this.taskDefinitionKey === 'deptLeaderApprove') {
           let arr = await this.getTableValue();
           let ids = arr.productList.map((item) => item.warehouseId);

+ 16 - 9
src/views/bpm/outgoingManagement/add.vue

@@ -81,6 +81,7 @@
               prop="sourceBizNo"
             >
               <el-input
+                :disabled="isTask"
                 @input="$forceUpdate()"
                 placeholder="请输入"
                 @change="handleDocumentSourceChange"
@@ -320,7 +321,7 @@
       </el-form>
 
       <div class="material">
-        <div style="width: 100%; text-align: right"
+        <div style="width: 100%; text-align: right" v-if="!isTask"
           ><el-button type="primary" @click="addStock">添加</el-button></div
         >
         <div v-if="dimension != 4">
@@ -403,7 +404,7 @@
                 <el-table-column
                   label="仓库"
                   width="300"
-                  prop="pathName"
+                  prop="warehouseName"
                 ></el-table-column>
                 <!-- <el-table-column
                 label="出库数量"
@@ -428,7 +429,7 @@
                   </el-row>
                 </template>
               </el-table-column> -->
-                <el-table-column label="操作" width="200">
+                <el-table-column label="操作" width="200" v-if="!isTask">
                   <template slot-scope="{ row, $index }">
                     <el-button type="text" @click="listDel(row, $index)"
                       >删除</el-button
@@ -559,7 +560,7 @@
           </el-tabs>
         </div>
       </div>
-      <div class="center mt20">
+      <div class="center mt20" v-if="!isTask">
         <el-button type="primary" @click="handleNewSave" :loading="saveLoading"
           >保存</el-button
         >
@@ -640,6 +641,7 @@
     },
     data() {
       return {
+        isTask: false,
         dimension: '3',
         llList: [],
         codeList: [],
@@ -907,6 +909,9 @@
           }
         });
       },
+      save() {
+        this.handleNewSave();
+      },
 
       onClear() {
         this.formData.sourceBizNo = '';
@@ -921,6 +926,8 @@
       eomSuccess(row) {
         console.log(row);
         this.formData.extInfo.assetType = 9;
+        this.formData.bizType = '3';
+        this.isTask = true;
         this.$refs.trees.valueTitle = '产品';
         this.title = '产品';
         this.formData.sourceBizNo = row.orderNo;
@@ -929,7 +936,7 @@
         this.formData.clientName = row.contactName;
         this.formData.clientUser = row.linkName;
         this.formData.clientPhone = row.linkPhone;
-        this.onSelectTableData(row.tableData, 1);
+        this.onSelectTableData(row.tableData || row.productList, 1);
         this.$forceUpdate();
       },
       pickOrderRow(row) {
@@ -1345,12 +1352,12 @@
             // shelfCode: '', //货架名称
             // areaId: '', //库区id
             // areaName: '', //库区名称
-            // warehouseId: '', //仓库id
-            // warehouseName: '', //仓库名称
+            warehouseId: next.warehouseId, //仓库id
+            warehouseName: next.warehouseName, //仓库名称
             assetType: this.formData.extInfo.assetType,
             outInNum: '',
-            assetCode: next.code,
-            assetName: next.name,
+            assetCode: next.code || next.productCode,
+            assetName: next.name || next.productName,
             bizStatus: 2,
             contactCode: next.contactCode
           };