huang_an 1 rok temu
rodzic
commit
f7c9199377

+ 66 - 63
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -54,39 +54,42 @@
               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>-->
+              <!--              <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"
             >
-              <fileMain 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>-->
+              <fileMain
+                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 ? '按数量计费' : '按重量计费' }}
@@ -171,17 +174,17 @@
             :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>-->
+            <!--            <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 }">
@@ -190,32 +193,32 @@
             :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>-->
+            <!--            <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>-->
+          <!--          <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>
@@ -239,8 +242,8 @@
   import { getSendSaleOrderrecordDetail } from '@/api/bpm/components/saleManage/saleorder';
   import { reviewStatusEnum } from '@/enum/dict';
   import { copyObj } from '@/utils/util';
-  import add from '@/views/bpm/outgoingManagement/outbound.vue';
-  import fileMain from "@/components/addDoc/index.vue";
+  import add from '@/views/bpm/outgoingManagement/outbound2.vue';
+  import fileMain from '@/components/addDoc/index.vue';
 
   export default {
     mixins: [dictMixins],
@@ -425,7 +428,7 @@
             label: '销售总金额',
             slot: 'totalPrice',
             formatter: (_row, _column, cellValue) => {
-              return _row.totalPrice? _row.totalPrice+ '元' : '';
+              return _row.totalPrice ? _row.totalPrice + '元' : '';
             },
             align: 'center'
           },

+ 6 - 1
src/views/bpm/handleTask/components/selectedCollectionOutbound/boxTabPage.vue

@@ -16,7 +16,12 @@
         ref="componentRef"
         v-bind="activeNameProps"
       /> -->
-      <outbound :activeNameProps="activeNameProps"></outbound>
+    </keep-alive>
+    <keep-alive>
+      <outbound
+        ref="componentRef"
+        :activeNameProps="activeNameProps"
+      ></outbound>
     </keep-alive>
   </div>
 </template>

+ 7 - 8
src/views/bpm/outgoingManagement/outbound.vue

@@ -772,15 +772,15 @@
                 return {
                   ...packingItem,
                   workOrderId:
-                    this.type === '自选领用出库'
+                    this.activeNameProps.type === '自选领用出库'
                       ? this.form.detailList[0].workOrderId
                       : '',
                   pickOrderId:
-                    this.type === '自选领用出库'
+                    this.activeNameProps.type === '自选领用出库'
                       ? this.form.detailList[0].pickOrderId
                       : '',
                   taskId:
-                    this.type === '自选领用出库'
+                    this.activeNameProps.type === '自选领用出库'
                       ? this.form.detailList[0].taskId
                       : '',
                   categoryName: productItem.categoryName,
@@ -934,7 +934,6 @@
         // this.formData.extInfo.deptName = obj.name;
         // this.formData.extInfo.createUserName = this.user.info.name;
         // this.formData.createUserId = this.user.info.userId;
-        console.log(this.form, 'llllllllllllllllllllllllllllllllll');
         // 物品类型
         this.formData.extInfo.assetType = Array.from(
           new Set(this.form.categoryLevelTopId?.split(','))
@@ -949,7 +948,7 @@
         this.formData.extInfo.createUserName = this.$store.state.user.info.name;
         this.formData.createUserId = this.$store.state.user.info.userId;
         // 生产相关逻辑
-        if (this.detailList?.length > 0) {
+        if (this.form.detailList?.length > 0) {
           // 获取领料人列表
           this.getStaffList({ id: this.form.executorDeptId }).then(() => {
             // 获取领料人和领料部门
@@ -960,7 +959,7 @@
           });
           let pData = {
             type: '1',
-            builders: this.detailList.map((item) => {
+            builders: this.form.detailList.map((item) => {
               return {
                 categoryId: item.instanceId || item.categoryId,
                 num: item.demandQuantity
@@ -984,11 +983,11 @@
         // 销售相关逻辑
         if (this.saleProductList?.length > 0) {
           // 获取领料人列表
-          this.getStaffList({ id: this.form.deptId }).then(() => {
+          this.getStaffList({ id: this.form.executorDeptId }).then(() => {
             // 获取领料人和领料部门
             this.formData.fromId = this.form.makerId;
             this.formData.fromUser = this.form.makerName;
-            this.formData.extInfo.verifyDeptCode = this.form.deptId;
+            this.formData.extInfo.verifyDeptCode = this.form.executorDeptId;
             this.formData.extInfo.verifyDeptName = this.form.deptName;
           });
           let pData = {

+ 2 - 2
src/views/bpm/outgoingManagement/outbound2.vue

@@ -882,7 +882,7 @@
         this.formData.extInfo.createUserName = this.$store.state.user.info.name;
         this.formData.createUserId = this.$store.state.user.info.userId;
         // 生产相关逻辑
-        if (this.detailList?.length > 0) {
+        if (this.form.detailList?.length > 0) {
           // 获取领料人列表
           this.getStaffList({ id: this.form.executorDeptId }).then(() => {
             // 获取领料人和领料部门
@@ -893,7 +893,7 @@
           });
           let pData = {
             type: '1',
-            builders: this.detailList.map((item) => {
+            builders: this.form.detailList.map((item) => {
               return {
                 categoryId: item.instanceId || item.categoryId,
                 num: item.demandQuantity

+ 10 - 11
src/views/bpm/outgoingManagement/outbound3.vue

@@ -661,10 +661,10 @@
       }
     },
     async created() {
-      this.getFieldModel();
-      this.getListItems();
       await this.getPickOrderDetail();
-      this.initDeptData().then(() => {
+      await this.getFieldModel();
+      await this.getListItems();
+      await this.initDeptData().then(() => {
         this.initFormData();
       });
     },
@@ -772,15 +772,15 @@
                 return {
                   ...packingItem,
                   workOrderId:
-                    this.type === '自选领用出库'
+                    this.activeNameProps.type === '自选领用出库'
                       ? this.form.detailList[0].workOrderId
                       : '',
                   pickOrderId:
-                    this.type === '自选领用出库'
+                    this.activeNameProps.type === '自选领用出库'
                       ? this.form.detailList[0].pickOrderId
                       : '',
                   taskId:
-                    this.type === '自选领用出库'
+                    this.activeNameProps.type === '自选领用出库'
                       ? this.form.detailList[0].taskId
                       : '',
                   categoryName: productItem.categoryName,
@@ -934,7 +934,6 @@
         // this.formData.extInfo.deptName = obj.name;
         // this.formData.extInfo.createUserName = this.user.info.name;
         // this.formData.createUserId = this.user.info.userId;
-
         // 物品类型
         this.formData.extInfo.assetType = Array.from(
           new Set(this.form.categoryLevelTopId?.split(','))
@@ -949,7 +948,7 @@
         this.formData.extInfo.createUserName = this.$store.state.user.info.name;
         this.formData.createUserId = this.$store.state.user.info.userId;
         // 生产相关逻辑
-        if (this.detailList?.length > 0) {
+        if (this.form.detailList?.length > 0) {
           // 获取领料人列表
           this.getStaffList({ id: this.form.executorDeptId }).then(() => {
             // 获取领料人和领料部门
@@ -960,7 +959,7 @@
           });
           let pData = {
             type: '1',
-            builders: this.detailList.map((item) => {
+            builders: this.form.detailList.map((item) => {
               return {
                 categoryId: item.instanceId || item.categoryId,
                 num: item.demandQuantity
@@ -984,11 +983,11 @@
         // 销售相关逻辑
         if (this.saleProductList?.length > 0) {
           // 获取领料人列表
-          this.getStaffList({ id: this.form.deptId }).then(() => {
+          this.getStaffList({ id: this.form.executorDeptId }).then(() => {
             // 获取领料人和领料部门
             this.formData.fromId = this.form.makerId;
             this.formData.fromUser = this.form.makerName;
-            this.formData.extInfo.verifyDeptCode = this.form.deptId;
+            this.formData.extInfo.verifyDeptCode = this.form.executorDeptId;
             this.formData.extInfo.verifyDeptName = this.form.deptName;
           });
           let pData = {