cz 1 жил өмнө
parent
commit
17ea2eb269
26 өөрчлөгдсөн 778 нэмэгдсэн , 476 устгасан
  1. 9 0
      src/components/byTable/index.vue
  2. 2 2
      src/components/process/EHSD/Contract.vue
  3. 3 3
      src/components/process/SF/Contract.vue
  4. 2 2
      src/components/process/SF/ContractChange.vue
  5. 2 2
      src/components/process/SF/PriceSheet.vue
  6. 1 1
      src/utils/util.js
  7. 9 0
      src/views/EHSD/procurement/purchasedEHSD/index.vue
  8. 26 1
      src/views/EHSD/productLibrary/companyProduct/index.vue
  9. 2 2
      src/views/EHSD/saleContract/PriceSheetDetail.vue
  10. 48 19
      src/views/EHSD/saleContract/contractEHSD/index.vue
  11. 1 1
      src/views/EHSD/saleContract/priceSheetEHSD/index.vue
  12. 12 7
      src/views/EHSD/saleContract/priceSheetForeign/index.vue
  13. 12 7
      src/views/MES/productionOrder/index.vue
  14. 160 77
      src/views/MES/productionTask/index.vue
  15. 8 29
      src/views/customer/portrait/com/LatestProgress.vue
  16. 1 1
      src/views/index.vue
  17. 7 6
      src/views/product/material/index.vue
  18. 42 68
      src/views/production/project/moldManage/index.vue
  19. 15 3
      src/views/production/project/processes/index.vue
  20. 13 4
      src/views/purchaseManage/purchaseManage/purchase/index.vue
  21. 2 2
      src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue
  22. 2 2
      src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue
  23. 193 116
      src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue
  24. 190 120
      src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue
  25. 1 1
      src/views/salesMange/afterSales/index.vue
  26. 15 0
      src/views/systemTenant/tenant/deptTenant/index.vue

+ 9 - 0
src/components/byTable/index.vue

@@ -112,11 +112,13 @@
         <el-table-column v-for="(item, index) in configData" :key="index" v-bind="getAttrsValue(item)" :type="item.type || ''" :selectable="
             (rowData, rowIndex) => isSelectable(rowData, rowIndex, item)
           ">
+
           <template #header v-if="item.attrs.isNeedHeaderSlot">
             <slot :name="item.attrs.headerSlot" :headerLabel="item.attrs.label" v-if="item.attrs.headerSlot">
               头部插槽占位符
             </slot>
           </template>
+          <!-- v-if="!item.type" -->
 
           <template #default="scope" v-if="!item.type">
             <slot :name="item.attrs.slot" :item="scope.row" :index="scope.$index" :headerLabel="item.attrs.label" v-if="item.attrs.slot">
@@ -134,6 +136,13 @@
               {{ getValue(scope, item) }}
             </div>
           </template>
+
+          <template #default="scope" v-else-if="item.type && item.attrs && item.attrs.slot">
+            <slot :name="item.attrs.slot" :item="scope.row" :index="scope.$index" :headerLabel="item.attrs.label" v-if="item.attrs.slot">
+              插槽占位符
+            </slot>
+          </template>
+
         </el-table-column>
       </el-table>
 

+ 2 - 2
src/components/process/EHSD/Contract.vue

@@ -377,11 +377,11 @@ const formConfig = computed(() => {
       data: [
         {
           dictKey: "0",
-          dictValue: "内销",
+          dictValue: "常规订单",
         },
         {
           dictKey: "1",
-          dictValue: "外销",
+          dictValue: "出口退税订单",
         },
       ],
       fn: (val) => {

+ 3 - 3
src/components/process/SF/Contract.vue

@@ -535,11 +535,11 @@ const formConfig = computed(() => {
       data: [
         {
           dictKey: "2",
-          dictValue: "内销",
+          dictValue: "常规订单",
         },
         {
           dictKey: "1",
-          dictValue: "外销",
+          dictValue: "出口退税订单",
         },
       ],
       itemWidth: 50,
@@ -1729,7 +1729,7 @@ onMounted(() => {
   // 报价转销售订单
   if (route.query && route.query.priceSheetId) {
     getPriceSheetData(route.query.priceSheetId);
-    isEditList.value = false;
+    isEditList.value = route.query.isEditList;
   } else if (route.query && route.query.businessId && route.query.processType) {
     let businessId = route.query.businessId;
     getAllData(businessId);

+ 2 - 2
src/components/process/SF/ContractChange.vue

@@ -535,11 +535,11 @@ const formConfig = computed(() => {
       data: [
         {
           dictKey: "2",
-          dictValue: "内销",
+          dictValue: "常规订单",
         },
         {
           dictKey: "1",
-          dictValue: "外销",
+          dictValue: "出口退税订单",
         },
       ],
       itemWidth: 50,

+ 2 - 2
src/components/process/SF/PriceSheet.vue

@@ -368,11 +368,11 @@ const formConfig = computed(() => {
       data: [
         {
           dictKey: "2",
-          dictValue: "内销",
+          dictValue: "常规订单",
         },
         {
           dictKey: "1",
-          dictValue: "外销",
+          dictValue: "出口退税订单",
         },
       ],
       itemWidth: 50,

+ 1 - 1
src/utils/util.js

@@ -573,7 +573,7 @@ export function msgTip(message, type = 1) {
     type: obj[type],
     message,
   })
-  return
+
 }
 
 // 消息确认

+ 9 - 0
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -582,6 +582,15 @@ const handleArrival = (row) => {
 const submitForm = () => {
   formDom.value.handleSubmit(() => {
     submitLoading.value = true;
+    for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+      const ele = formData.data.purchaseProductList[i];
+      if (
+        ele.quantity + ele.aaqus >
+        Number(parseFloat(Number(ele.quantity * 1.05)).toFixed(2))
+      ) {
+        return proxy.msgTip("到货量超出上限,若要接收,请另发申购单", 2);
+      }
+    }
     proxy.post("/afterSalesRecord/add", formData.data).then(
       (res) => {
         ElMessage({

+ 26 - 1
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -109,7 +109,7 @@
         <template #accessories>
           <div style="width: 100%">
             <el-button type="primary" @click="openSelectMaterial = true" plain>选择</el-button>
-            <el-table :data="formData.bomData.productBomDetailList" style="width: 100%; margin-top: 16px">
+            <el-table :data="formData.bomData.productBomDetailList" style="width: 100%; margin-top: 16px" border>
               <el-table-column prop="materialName" label="物料名称" min-width="130" />
               <el-table-column prop="materialCode" label="物料编码" width="150" />
               <el-table-column label="数量" width="150">
@@ -131,6 +131,17 @@
             </el-table>
           </div>
         </template>
+
+        <template #detail>
+          <div style="width: 100%">
+            <el-table :data="formData.bomData.processesList" style="width: 100%; " border>
+              <el-table-column label="序号" type="index" width="80" />
+              <el-table-column prop="code" label="工序编码" />
+              <el-table-column prop="name" label="工序名称" />
+            </el-table>
+          </div>
+        </template>
+
       </byForm>
       <!-- </div> -->
       <template #footer>
@@ -771,6 +782,10 @@ const bomFormOption = reactive({
 const bomFormConfig = computed(() => {
   return [
     {
+      type: "title1",
+      title: "BOM 信息",
+    },
+    {
       type: "select",
       prop: "rawMaterialId",
       label: "原材料",
@@ -785,6 +800,15 @@ const bomFormConfig = computed(() => {
       label: "包材辅料",
       itemWidth: 100,
     },
+    {
+      type: "title1",
+      title: "生产工序",
+    },
+    {
+      type: "slot",
+      slotName: "detail",
+      label: " ",
+    },
   ];
 });
 const bomRules = ref({
@@ -800,6 +824,7 @@ const bomSetting = (row) => {
       id: res.id,
       rawMaterialId: res.rawMaterialId,
       productBomDetailList: [],
+      processesList: res.processesList,
     };
     if (res.productBomDetailList && res.productBomDetailList.length > 0) {
       formData.bomData.productBomDetailList = res.productBomDetailList.filter(

+ 2 - 2
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -188,11 +188,11 @@ const props = defineProps({
 });
 const typeData = ref([
   {
-    label: "内销",
+    label: "常规订单",
     value: 1,
   },
   {
-    label: "外销",
+    label: "出口退税订单",
     value: 2,
   },
 ]);

+ 48 - 19
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -68,12 +68,12 @@
 
         <template #prodTag="{ item }">
           <div style="width: 100%;display:flex;align-items:center">
-            <el-icon :size="16" style="cursor:pointer;margin-right: 8px;position:relative;top:5px" color="#409EFF" @click="handleEditTag(item)">
+            <el-icon :size="16" style="cursor:pointer;margin-right: 8px;" color="#409EFF" @click="handleEditTag(item)">
               <Edit />
             </el-icon>
             <el-popover placement="top-start" :width="300" trigger="hover">
               <div>
-                aabeizhu
+                备注:{{item.prodRemark}}
               </div>
               <template #reference>
                 <div style="width:100%;display:inline-block">
@@ -85,7 +85,6 @@
 
               </template>
             </el-popover>
-
           </div>
         </template>
 
@@ -337,6 +336,7 @@ const sourceList = ref({
     endTime: "",
     deliveryTimeSta: "",
     deliveryTimeEnd: "",
+    type: route.query.pageType,
   },
 });
 const loading = ref(false);
@@ -482,6 +482,21 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "合同金额",
+        slot: "amount",
+        width: 140,
+        align: "right",
+      },
+    },
+    {
+      attrs: {
+        label: "生产指示",
+        slot: "prodTag",
+        "min-width": 240,
+      },
+    },
+    {
+      attrs: {
         label: "客户名称",
         slot: "buyCorporationName",
         "min-width": 180,
@@ -519,14 +534,7 @@ const config = computed(() => {
         align: "right",
       },
     },
-    {
-      attrs: {
-        label: "合同金额",
-        slot: "amount",
-        width: 140,
-        align: "right",
-      },
-    },
+
     {
       attrs: {
         label: "已收款金额",
@@ -587,13 +595,7 @@ const config = computed(() => {
         return proxy.dictValueLabel(type, status.value);
       },
     },
-    {
-      attrs: {
-        label: "生产指示",
-        slot: "prodTag",
-        "min-width": 240,
-      },
-    },
+
     {
       attrs: {
         label: "操作",
@@ -616,6 +618,7 @@ const config = computed(() => {
                 },
               }
             : {},
+
           route.query.pageType == "1"
             ? {
                 attrs: {
@@ -629,6 +632,31 @@ const config = computed(() => {
                 },
               }
             : {},
+          row.status == 30 && row.outboundStatus == 0
+            ? {
+                attrs: {
+                  label: "销售出库",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  proxy
+                    .msgConfirm()
+                    .then((res) => {
+                      proxy
+                        .post("/contract/saleOutbound", {
+                          id: row.id,
+                        })
+                        .then((res) => {
+                          proxy.msgTip("操作成功", 1);
+                          getList();
+                        });
+                    })
+                    .catch((err) => {});
+                },
+              }
+            : {},
           row.status == 30
             ? {
                 attrs: {
@@ -1420,7 +1448,7 @@ const tagFormConfig = computed(() => [
   },
   {
     type: "input",
-    prop: "aa",
+    prop: "prodRemark",
     itemType: "textarea",
     label: "备注",
     itemWidth: 100,
@@ -1434,6 +1462,7 @@ const submitTag = () => {
     const data = {
       id: formData.tagData.id,
       prodTag: formData.tagData.prodTag.join(","),
+      prodRemark: formData.tagData.prodRemark,
     };
     formLoading.value = true;
     proxy.post("/contract/updateProductionTag", data).then((res) => {

+ 1 - 1
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -487,7 +487,7 @@ const quotationStatusData = ref([
 ]);
 const typeData = ref([
   {
-    label: "内销",
+    label: "常规订单",
     value: 1,
   },
   {

+ 12 - 7
src/views/EHSD/saleContract/priceSheetForeign/index.vue

@@ -94,7 +94,8 @@
       <template #btn="{item}">
         <div style="width: 100%">
           <!-- <el-button type="primary" text v-debounce @click="handleFollow(item)">跟进</el-button> -->
-          <el-button type="primary" text v-debounce v-if="item.status !=88" @click="handleGenerate(item)">生成订单</el-button>
+          <el-button type="primary" text v-debounce v-if="item.status !=88" @click="handleGenerate(item,false)">生成订单</el-button>
+          <el-button type="primary" text v-debounce v-if="item.status !=88" @click="handleGenerate(item,true)">生成样品单</el-button>
           <el-button type="primary" text v-debounce v-if="item.status !=88" @click="getDtl(item)">调价</el-button>
           <el-button type="danger" text v-debounce v-if="item.status !=0 && item.status !=88" @click="handleRepeal(item)">作废</el-button>
         </div>
@@ -233,7 +234,9 @@
       <template #footer>
         <el-button @click="detailDialog = false" size="defualt" v-debounce>关 闭</el-button>
         <el-button type="primary" v-debounce v-if="leftRowData.status !=88 &&leftRowData.status !=70"
-                   @click="handleGenerate(leftRowData)">生成订单</el-button>
+                   @click="handleGenerate(leftRowData,false)">生成订单</el-button>
+        <el-button type="primary" v-debounce v-if="leftRowData.status !=88 &&leftRowData.status !=70"
+                   @click="handleGenerate(leftRowData,true)">生成样品单</el-button>
         <el-button type="primary" v-debounce v-if="leftRowData.status !=88 &&leftRowData.status !=70" @click="getDtl(leftRowData)">调价</el-button>
         <el-button type="danger" v-debounce v-if="leftRowData.status !=0 && leftRowData.status !=88 &&leftRowData.status !=70"
                    @click="handleRepeal(leftRowData)">作废</el-button>
@@ -285,11 +288,11 @@ const quotationStatusData = ref([
 ]);
 const typeData = ref([
   {
-    label: "内销",
+    label: "常规订单",
     value: 1,
   },
   {
-    label: "外销",
+    label: "出口退税订单",
     value: 2,
   },
 ]);
@@ -575,14 +578,16 @@ const clickMore = (row) => {
   openRecordMore.value = true;
 };
 
-const handleGenerate = (row) => {
+const handleGenerate = (row, flag) => {
+  let flowKey = flag ? "sample_flow" : "contract_flow";
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
     query: {
       priceSheetId: row.id,
-      flowKey: "contract_flow",
-      flowName: "销售合同审批流程",
+      flowKey: flowKey,
+      flowName: "订单流程",
       random: proxy.random(),
+      isEditList: flag,
     },
   });
   detailDialog.value = false;

+ 12 - 7
src/views/MES/productionOrder/index.vue

@@ -20,13 +20,18 @@
 
         <template #prodTag="{ item }">
           <div style="width: 100%">
-            <!-- <el-icon :size="16" style="cursor:pointer;margin-right: 5px;position:relative;top:5px" color="#409EFF" @click="handleEditTag(item)">
-              <Edit />
-            </el-icon>  -->
-            <!-- closable @close="prodTagClose(index, item)" -->
-            <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index">
-              {{ dictKeyValue(tag, contractTag) }}
-            </el-tag>
+            <el-popover placement="top-start" :width="300" trigger="hover">
+              <div>
+                备注:{{item.prodRemark}}
+              </div>
+              <template #reference>
+                <div style="width:100%;display:inline-block">
+                  <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index">
+                    {{ dictKeyValue(tag, contractTag) }}
+                  </el-tag>
+                </div>
+              </template>
+            </el-popover>
           </div>
         </template>
 

+ 160 - 77
src/views/MES/productionTask/index.vue

@@ -1,8 +1,7 @@
 <template>
   <div class="pageIndexClass">
-    <div>
-      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
-               :selectConfig="selectConfig" :action-list="[ {
+    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+             :selectConfig="selectConfig" :action-list="[ {
                 text: '打印任务单',
                 action: () => openModal('add'),
                 disabled: selectIds.length==0,
@@ -14,53 +13,70 @@
        'select-all':selectRow
         }" @get-list="getList">
 
-        <template #orderCode="{ item }">
-          <div style="width: 100%" class="el-click" @click="lookDetails(item)">
-            {{item.orderCode}}
-          </div>
-        </template>
+      <template #orderCode="{ item }">
+        <div style="width: 100%" class="el-click" @click="lookDetails(item)">
+          {{item.orderCode}}
+        </div>
+      </template>
 
-        <template #pic="{ item }">
-          <div v-if="item.fileList &&item.fileList.length > 0">
-            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
-          </div>
-          <div v-else></div>
-        </template>
+      <template #pic="{ item }">
+        <div v-if="item.fileList &&item.fileList.length > 0">
+          <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
+        </div>
+        <div v-else></div>
+      </template>
 
-        <template #picOne="{ item }">
-          <div v-if="item.fileListOne &&item.fileListOne.length > 0">
-            <img :src="item.fileListOne[0].fileUrl" class="pic" @click="handleClickFile(item.fileListOne[0])" />
-          </div>
-          <div v-else></div>
-        </template>
+      <template #picOne="{ item }">
+        <div v-if="item.fileListOne &&item.fileListOne.length > 0">
+          <img :src="item.fileListOne[0].fileUrl" class="pic" @click="handleClickFile(item.fileListOne[0])" />
+        </div>
+        <div v-else></div>
+      </template>
 
-        <template #size="{ item }">
-          <div v-if="item.productLength && item.productWidth && item.productHeight">
-            <span>{{ item.productLength }}</span>*
-            <span>{{ item.productWidth }}</span>*
-            <span>{{ item.productHeight }}</span>
-          </div>
-        </template>
+      <template #size="{ item }">
+        <div v-if="item.productLength && item.productWidth && item.productHeight">
+          <span>{{ item.productLength }}</span>*
+          <span>{{ item.productWidth }}</span>*
+          <span>{{ item.productHeight }}</span>
+        </div>
+      </template>
 
-        <template #isOverdue="{item}">
-          <div style="width: 100%">
-            <span class="red" v-if="item.isOverdue=='1'"> 逾期 </span>
-          </div>
-        </template>
+      <template #isOverdue="{item}">
+        <div style="width: 100%">
+          <span class="red" v-if="item.isOverdue=='1'"> 逾期 </span>
+        </div>
+      </template>
 
-        <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
-          <div style="width:100%">
-            <span v-if="isShowCotent(slotItem,item)" style="font-weight:700;min-width:50px;line-height:18px;display:inline-block"
-                  :class="showCotentQuantity(slotItem,item)">
-              {{showCotent(slotItem,item)}}
-            </span>
-            <div v-else class="no-bk">
-              -
+      <template #prodTag="{ item }">
+        <div style="width: 100%">
+          <el-popover placement="top-start" :width="300" trigger="hover">
+            <div>
+              备注:{{item.prodRemark}}
             </div>
+            <template #reference>
+              <div style="width:100%;display:inline-block">
+                <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index">
+                  {{ dictKeyValue(tag, contractTag) }}
+                </el-tag>
+              </div>
+            </template>
+          </el-popover>
+        </div>
+      </template>
+
+      <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
+        <div style="width:100%">
+          <span v-if="isShowCotent(slotItem,item)" style="font-weight:700;min-width:50px;line-height:18px;display:inline-block"
+                :class="showCotentQuantity(slotItem,item)">
+            {{showCotent(slotItem,item)}}
+          </span>
+          <div v-else class="no-bk">
+            -
           </div>
-        </template>
-      </byTable>
-    </div>
+        </div>
+      </template>
+    </byTable>
+
     <el-dialog :title="'打印任务单'" v-model="dialogVisible" width="840px" destroy-on-close :before-close="beforeClose">
       <div style="height:calc(100vh - 280px);overflow:auto;padding: 0 10px">
         <div id="pdfDom" style="width:100%">
@@ -257,6 +273,7 @@
       </template>
     </el-dialog>
   </div>
+
 </template>
 
 <script setup>
@@ -266,6 +283,9 @@ import QRCode from "qrcodejs2-fix";
 import moment from "moment";
 
 const { proxy } = getCurrentInstance();
+const contractTag = computed(
+  () => proxy.useUserStore().allDict["contract_prod_tag"]
+);
 const companyData = ref([]);
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -358,6 +378,40 @@ const config = ref([
   },
   {
     attrs: {
+      label: "操作",
+      width: "160",
+      align: "left",
+      // fixed: "right",
+    },
+    renderHTML(row) {
+      return [
+        {
+          attrs: {
+            label: "打印任务单",
+            type: "primary",
+            text: true,
+          },
+          el: "button",
+          click() {
+            printQrCode(row);
+          },
+        },
+        {
+          attrs: {
+            label: "备注",
+            type: "primary",
+            text: true,
+          },
+          el: "button",
+          click() {
+            openRemark(row);
+          },
+        },
+      ];
+    },
+  },
+  {
+    attrs: {
       label: "生产公司",
       prop: "companyName",
       width: 100,
@@ -422,6 +476,20 @@ const config = ref([
   },
   {
     attrs: {
+      label: "已完成",
+      prop: "finishQuantity",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
+      label: "未完成",
+      prop: "incomplete",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
       label: "生产状态",
       prop: "produceStatus",
       width: 100,
@@ -439,6 +507,13 @@ const config = ref([
   },
   {
     attrs: {
+      label: "生产指示",
+      slot: "prodTag",
+      "min-width": 220,
+    },
+  },
+  {
+    attrs: {
       label: "下单时间",
       prop: "orderCreateTime",
       width: 160,
@@ -513,6 +588,14 @@ const getList = async (req) => {
   proxy
     .post("/produceOrderDetail/page", sourceList.value.pagination)
     .then((res) => {
+      res.rows.forEach((x) => {
+        if (x.prodTag) {
+          x.prodTags = x.prodTag.split(",");
+        } else {
+          x.prodTags = [];
+        }
+        x.incomplete = x.quantity - x.finishQuantity;
+      });
       sourceList.value.data = res.rows.map((x) => ({ ...x, isCheck: true }));
       sourceList.value.pagination.total = res.total;
       setTimeout(() => {
@@ -660,40 +743,40 @@ const getProcesses = () => {
         });
       }
 
-      config.value.push({
-        attrs: {
-          label: "操作",
-          width: "160",
-          align: "center",
-          fixed: "right",
-        },
-        renderHTML(row) {
-          return [
-            {
-              attrs: {
-                label: "打印任务单",
-                type: "primary",
-                text: true,
-              },
-              el: "button",
-              click() {
-                printQrCode(row);
-              },
-            },
-            {
-              attrs: {
-                label: "备注",
-                type: "primary",
-                text: true,
-              },
-              el: "button",
-              click() {
-                openRemark(row);
-              },
-            },
-          ];
-        },
-      });
+      // config.value.push({
+      //   attrs: {
+      //     label: "操作",
+      //     width: "160",
+      //     align: "center",
+      //     fixed: "right",
+      //   },
+      //   renderHTML(row) {
+      //     return [
+      //       {
+      //         attrs: {
+      //           label: "打印任务单",
+      //           type: "primary",
+      //           text: true,
+      //         },
+      //         el: "button",
+      //         click() {
+      //           printQrCode(row);
+      //         },
+      //       },
+      //       {
+      //         attrs: {
+      //           label: "备注",
+      //           type: "primary",
+      //           text: true,
+      //         },
+      //         el: "button",
+      //         click() {
+      //           openRemark(row);
+      //         },
+      //       },
+      //     ];
+      //   },
+      // });
       processesData.value = res.rows;
     });
 };

+ 8 - 29
src/views/customer/portrait/com/LatestProgress.vue

@@ -1,13 +1,7 @@
 <template>
   <div v-loading="loading" class="progress">
     <el-timeline reverse>
-      <el-timeline-item
-        v-for="(item, index) in progressList"
-        :key="index"
-        color="#0084FF"
-        placement="top"
-        hide-timestamp
-      >
+      <el-timeline-item v-for="(item, index) in progressList" :key="index" color="#0084FF" placement="top" hide-timestamp>
         <div class="details" :style="getColor(item.type)">
           <div class="t">{{ getTitle(item.type) }}</div>
           <div class="content11" v-if="item.type != 30">
@@ -17,36 +11,21 @@
               <span v-if="item.type === 10">报价单总金额</span>
               <span v-if="item.type === 20">合同总金额</span>
               <span>{{ moneyFormat(item.amount, 2) }}</span>
-              <span
-                v-if="item.type === 10 && item.code"
-                :class="{ 'code-class': isHave }"
-                @click="isHaveOne ? handlePushRoute(item) : () => {}"
-                >({{ item.code }})</span
-              >
-              <span
-                v-if="item.type === 20 && item.contractCode"
-                :class="{ 'code-class': isHaveOne }"
-                @click="isHave ? handlePushRoute(item) : () => {}"
-                >({{ item.contractCode }})</span
-              >
+              <span v-if="item.type === 10 && item.code" :class="{ 'code-class': isHave }"
+                    @click="isHaveOne ? handlePushRoute(item) : () => {}">({{ item.code }})</span>
+              <span v-if="item.type === 20 && item.contractCode" :class="{ 'code-class': isHaveOne }"
+                    @click="isHave ? handlePushRoute(item) : () => {}">({{ item.contractCode }})</span>
             </span>
           </div>
           <div class="content11" v-else>
             <span class="gray">跟进记录: </span>
             <span class="val"> {{ item.remark }} </span>
           </div>
-          <div
-            style="margin: 8px 0; display: flex"
-            v-if="item.fileList && item.fileList.length > 0"
-          >
+          <div style="margin: 8px 0; display: flex" v-if="item.fileList && item.fileList.length > 0">
             <div style="width: 36px; color: #999999">附件:</div>
             <div style="width: calc(100% - 36px)">
               <div v-for="(file, index) in item.fileList" :key="index">
-                <a
-                  style="color: #409eff; cursor: pointer"
-                  @click="openFile(file.fileUrl)"
-                  >{{ file.fileName }}</a
-                >
+                <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
               </div>
             </div>
           </div>
@@ -125,7 +104,7 @@ const getTitle = (type) => {
     case 20:
       return "合同";
     case 30:
-      return "手动跟进";
+      return "其他跟进";
     default:
       return "";
   }

+ 1 - 1
src/views/index.vue

@@ -431,7 +431,7 @@ const getData = () => {
     .post("/sale/accountRunningWater/page", {
       pageNum: 1,
       pageSize: 5,
-      isClaim: "0,1",
+      isClaim: "0,2",
       dataType: "1",
     })
     .then((res) => {

+ 7 - 6
src/views/product/material/index.vue

@@ -88,7 +88,7 @@
       </template>
     </el-dialog>
 
-    <el-dialog :title="'关联产品'+`  (${associationData.pagination.total})`" v-model="openAssociationProduct" width="70%" destroy-on-close>
+    <el-dialog :title="'关联产品'" v-model="openAssociationProduct" width="70%" destroy-on-close>
       <div>
         <!-- class="public_height_dialog" -->
         <!-- <el-table :data="associationProductData" style="width: 100%;">
@@ -131,9 +131,9 @@
 
         </byTable>
       </div>
-      <template #footer>
+      <!-- <template #footer>
         <el-button @click="openAssociationProduct = false" size="defualt" v-debounce>关 闭</el-button>
-      </template>
+      </template> -->
     </el-dialog>
 
   </div>
@@ -651,7 +651,7 @@ const associationConfig = computed(() => {
       attrs: {
         label: "产品颜色",
         prop: "color",
-        width: 140,
+        width: 160,
       },
     },
   ];
@@ -665,7 +665,7 @@ const associationData = ref({
   },
 });
 const openAssociationProduct = ref(false);
-const getAssociationList = (req) => {
+const getAssociationList = (req = {}) => {
   associationData.value.pagination = {
     ...associationData.value.pagination,
     ...req,
@@ -676,7 +676,8 @@ const getAssociationList = (req) => {
       associationData.value.pagination
     )
     .then((res) => {
-      associationData.value.data = res;
+      associationData.value.data = res.rows;
+      associationData.value.pagination.total = res.total;
       let productIds = associationData.value.data.map((x) => x.id);
       if (productIds && productIds.length > 0) {
         proxy.getFileData({

+ 42 - 68
src/views/production/project/moldManage/index.vue

@@ -9,11 +9,7 @@
             action: () => openModal('add'),
           },
         ]" @get-list="getList">
-        <template #fileSlot="{ item }">
-          <div style="cursor: pointer; color: #409eff" @click="handleClickFile(item)">
-            {{ item.fileName }}
-          </div>
-        </template>
+
       </byTable>
     </div>
     <el-dialog :title="modalType == 'add' ? '添加模具' : '编辑模具'" v-model="dialogVisible" width="800">
@@ -47,14 +43,15 @@ const sourceList = ref({
     total: 3,
     pageNum: 1,
     pageSize: 10,
+    keyword: "",
   },
 });
 let dialogVisible = ref(false);
 let modalType = ref("add");
 let fileList = ref([]);
 let rules = ref({
-  name: [{ required: true, message: "请输入模具名称", trigger: "blur" }],
-  code: [{ required: true, message: "请输入模具编号", trigger: "blur" }],
+  moldName: [{ required: true, message: "请输入模具名称", trigger: "blur" }],
+  // code: [{ required: true, message: "请输入模具编号", trigger: "blur" }],
 });
 const { proxy } = getCurrentInstance();
 const selectConfig = reactive([
@@ -82,32 +79,32 @@ const config = computed(() => {
     {
       attrs: {
         label: "模具名称",
-        prop: "name",
+        prop: "moldName",
       },
     },
 
     {
       attrs: {
-        label: "长",
-        prop: "name",
+        label: "长 (cm)",
+        prop: "moldLength",
       },
     },
     {
       attrs: {
-        label: "宽",
-        prop: "name",
+        label: "宽 (cm)",
+        prop: "moldWidth",
       },
     },
     {
       attrs: {
-        label: "高",
-        prop: "name",
+        label: "高 (cm)",
+        prop: "moldHeight",
       },
     },
     {
       attrs: {
         label: "备注",
-        prop: "remarks",
+        prop: "remark",
       },
     },
 
@@ -140,28 +137,19 @@ const config = computed(() => {
             el: "button",
             click() {
               // 弹窗提示是否删除
-              ElMessageBox.confirm(
-                "此操作将永久删除该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
-                // 删除
-                proxy
-                  .post("/productionProcesses/delete", {
-                    id: row.id,
-                  })
-                  .then((res) => {
-                    ElMessage({
-                      message: "删除成功",
-                      type: "success",
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/moldInfo/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      proxy.msgTip("删除成功", 1);
+                      getList();
                     });
-                    getList();
-                  });
-              });
+                })
+                .catch((err) => {});
             },
           },
         ];
@@ -186,14 +174,14 @@ const formConfig = computed(() => {
   return [
     {
       type: "input",
-      prop: "name",
+      prop: "moldName",
       label: "模具名称",
       required: true,
     },
     {
       type: "number",
-      prop: "netWeight",
-      label: "长",
+      prop: "moldLength",
+      label: "长 (cm)",
       precision: 2,
       min: 0,
       controls: false,
@@ -201,8 +189,8 @@ const formConfig = computed(() => {
     },
     {
       type: "number",
-      prop: "netWeight",
-      label: "宽",
+      prop: "moldWidth",
+      label: "宽 (cm)",
       precision: 2,
       min: 0,
       controls: false,
@@ -210,8 +198,8 @@ const formConfig = computed(() => {
     },
     {
       type: "number",
-      prop: "netWeight",
-      label: "高",
+      prop: "moldHeight",
+      label: "高 (cm)",
       precision: 2,
       min: 0,
       controls: false,
@@ -219,7 +207,7 @@ const formConfig = computed(() => {
     },
     {
       type: "input",
-      prop: "remarks",
+      prop: "remark",
       label: "备注",
       itemType: "textarea",
     },
@@ -228,41 +216,36 @@ const formConfig = computed(() => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/productionProcesses/page", sourceList.value.pagination)
-    .then((message) => {
-      console.log(message);
-      sourceList.value.data = message.rows;
-      sourceList.value.pagination.total = message.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-    });
+  proxy.post("/moldInfo/page", sourceList.value.pagination).then((message) => {
+    console.log(message);
+    sourceList.value.data = message.rows;
+    sourceList.value.pagination.total = message.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
 const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";
   formData.data = {};
-  fileList.value = [];
 };
 
 const submitForm = () => {
   byform.value.handleSubmit((valid) => {
     formData.data.fileList = fileList.value;
     submitLoading.value = true;
-    proxy.post("/productionProcesses/" + modalType.value, formData.data).then(
+    proxy.post("/moldInfo/" + modalType.value, formData.data).then(
       (res) => {
         ElMessage({
           message: modalType.value == "add" ? "添加成功" : "编辑成功",
           type: "success",
         });
-        fileList.value = [];
         dialogVisible.value = false;
         submitLoading.value = false;
         getList();
       },
       (err) => {
-        console.log(err, "aswwwww");
         submitLoading.value = false;
       }
     );
@@ -279,16 +262,7 @@ const submitForm = () => {
 
 const getDtl = (row) => {
   modalType.value = "edit";
-  proxy.post("/productionProcesses/detail", { id: row.id }).then((res) => {
-    fileList.value = res.fileName
-      ? [
-          {
-            id: "",
-            fileName: res.fileName,
-            path: "",
-          },
-        ]
-      : [];
+  proxy.post("/moldInfo/detail", { id: row.id }).then((res) => {
     formData.data = res;
     dialogVisible.value = true;
   });

+ 15 - 3
src/views/production/project/processes/index.vue

@@ -109,6 +109,18 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "成本单价",
+        prop: "costPrice",
+      },
+    },
+    {
+      attrs: {
+        label: "生产日负荷",
+        prop: "capacity",
+      },
+    },
+    {
+      attrs: {
         label: "工序说明",
         prop: "remarks",
       },
@@ -211,7 +223,7 @@ const formConfig = computed(() => {
     },
     {
       type: "number",
-      prop: "netWeight",
+      prop: "costPrice",
       label: "成本单价",
       precision: 2,
       min: 0,
@@ -220,8 +232,8 @@ const formConfig = computed(() => {
     },
     {
       type: "number",
-      prop: "netWeight",
-      label: "负载量",
+      prop: "capacity",
+      label: "生产日负荷",
       precision: 0,
       min: 1,
       controls: false,

+ 13 - 4
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -48,10 +48,19 @@
 
         <template #prodTag="{ item }">
           <div style="width: 100%">
-            <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index"
-                    :closable="useUserStore().user.companyId=='100'" @close="prodTagClose(index, item)">
-              {{ dictKeyValue(tag, contractTag) }}
-            </el-tag>
+            <el-popover placement="top-start" :width="300" trigger="hover">
+              <div>
+                备注:{{item.prodRemark}}
+              </div>
+              <template #reference>
+                <div style="width:100%;display:inline-block">
+                  <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index"
+                          :closable="useUserStore().user.companyId=='100'" @close="prodTagClose(index, item)">
+                    {{ dictKeyValue(tag, contractTag) }}
+                  </el-tag>
+                </div>
+              </template>
+            </el-popover>
           </div>
         </template>
       </byTable>

+ 2 - 2
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -4,7 +4,7 @@
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[
           {
-            text: '手动出库',
+            text: '其他出库',
             action: () => openModal(),
           },
         ]" @get-list="getList">
@@ -18,7 +18,7 @@
       </byTable>
     </div>
 
-    <el-dialog title="手动出库" v-if="dialogVisible" v-model="dialogVisible" width="1200" v-loading="loadingDialog">
+    <el-dialog title="其他出库" v-if="dialogVisible" v-model="dialogVisible" width="1200" v-loading="loadingDialog">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #details>
           <div style="width: 100%">

+ 2 - 2
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -4,7 +4,7 @@
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[
           {
-            text: '手动入库',
+            text: '其他入库',
             action: () => openModal(),
           },
         ]" @get-list="getList">
@@ -18,7 +18,7 @@
       </byTable>
     </div>
 
-    <el-dialog title="手动入库" v-if="dialogVisible" v-model="dialogVisible" width="1200" v-loading="loadingDialog">
+    <el-dialog title="其他入库" v-if="dialogVisible" v-model="dialogVisible" width="1200" v-loading="loadingDialog">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #details>
           <div style="width: 100%">

+ 193 - 116
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -4,17 +4,73 @@
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row @get-list="getList">
 
-        <template #pic="{item}">
-          <div style="width: 100%">
-            <img v-if="item.fileUrl" :src="item.fileUrl" class="pic" @click="openImg(item.fileUrl)" />
+        <template #expand="{item}">
+          <div style="width:100%;padding:0 50px">
+            <el-table :data="item.stockWaitDetailsList" class="bom-table" border>
+              <el-table-column label="物品图片" width="100" align="center">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCode" label="物品编码" width="200" />
+              <el-table-column prop="productName" label="物品名称" min-width="130" />
+              <el-table-column label="尺寸 (cm)" width="140">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="需入库数量" prop="quantity" width="100" />
+              <el-table-column label="待入库数量" prop="waitQuantity" width="100" />
+              <el-table-column label="已入库数量" prop="receiptQuantity" width="100" />
+            </el-table>
           </div>
         </template>
 
       </byTable>
     </div>
 
-    <el-dialog title="出库" v-if="dialogVisible" v-model="dialogVisible" width="400" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog title="出库" v-if="dialogVisible" v-model="dialogVisible" width="1200">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+        <template #detail>
+          <div style="width:100%">
+            <div style="width:100%;padding:0 15px">
+              <el-table :data="formData.data.stockWaitDetailsList">
+                <el-table-column label="物品图片" width="80">
+                  <template #default="{ row }">
+                    <div v-if="row.fileUrl">
+                      <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="productCode" label="物品编码" width="160" />
+                <el-table-column prop="productName" label="物品名称" min-width="130" />
+                <el-table-column label="尺寸 (cm)" width="140">
+                  <template #default="{ row, $index }">
+                    <div style="width: 100%">
+                      {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="需入库数量" prop="needQuantity" width="100" />
+                <el-table-column label="待入库数量" prop="waitQuantity" width="100" />
+                <el-table-column label="已入库数量" prop="receiptQuantity" width="100" />
+                <el-table-column prop="quantity" label="入库数量" width="130">
+                  <template #default="{ row, $index }">
+                    <el-form-item :prop="'stockWaitDetailsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
+                                  class="margin-b-0">
+                      <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
+                                       :controls="false" :min="0" />
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </div>
+        </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="default">取 消</el-button>
@@ -128,7 +184,7 @@ const sourceList = ref({
     pageSize: 10,
     keyword: "",
     status: "",
-    type: "2",
+    type: 2,
   },
 });
 const loading = ref(false);
@@ -149,10 +205,18 @@ const selectConfig = computed(() => {
 const config = computed(() => {
   return [
     {
+      type: "expand",
+      attrs: {
+        slot: "expand",
+        width: 50,
+        align: "center",
+      },
+    },
+    {
       attrs: {
         label: "数据来源",
         prop: "businessType",
-        width: 120,
+        // width: 120,
       },
       render(type) {
         return proxy.dictValueLabel(type, businessType.value);
@@ -162,7 +226,7 @@ const config = computed(() => {
       attrs: {
         label: "单号",
         prop: "businessCode",
-        width: 160,
+        // width: 160,
       },
     },
     // {
@@ -175,28 +239,28 @@ const config = computed(() => {
     //     return proxy.dictValueLabel(type, productType.value);
     //   },
     // },
-    {
-      attrs: {
-        label: "图片",
-        slot: "pic",
-        align: "center",
-        width: 80,
-      },
-    },
-    {
-      attrs: {
-        label: "物品编码",
-        prop: "productCustomCode",
-        width: 140,
-      },
-    },
-    {
-      attrs: {
-        label: "物品名称",
-        prop: "productName",
-        "min-width": 200,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "图片",
+    //     slot: "pic",
+    //     align: "center",
+    //     width: 80,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "物品编码",
+    //     prop: "productCustomCode",
+    //     width: 140,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "物品名称",
+    //     prop: "productName",
+    //     "min-width": 200,
+    //   },
+    // },
     // {
     //   attrs: {
     //     label: "规格型号",
@@ -214,18 +278,18 @@ const config = computed(() => {
     //     return proxy.dictKeyValue(unit, materialUnitData.value);
     //   },
     // },
-    {
-      attrs: {
-        label: "待出库数量",
-        prop: "quantity",
-        width: 120,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "待出库数量",
+    //     prop: "quantity",
+    //     width: 120,
+    //   },
+    // },
     {
       attrs: {
         label: "出库状态",
         prop: "status",
-        width: 140,
+        // width: 140,
       },
       render(type) {
         return proxy.dictValueLabel(type, status.value);
@@ -272,31 +336,46 @@ const getDict = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/stockWaitDetails/page", sourceList.value.pagination)
-    .then((res) => {
-      sourceList.value.data = res.rows.map((x) => ({
-        ...x,
-        quantity: (x.quantity - x.receiptQuantity).toFixed(4),
-      }));
-      sourceList.value.pagination.total = res.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-
-      const productIdList = res.rows.map((x) => x.productId);
-      // 请求文件数据并回显
-      if (productIdList.length > 0) {
-        proxy.getFileData({
-          businessIdList: productIdList,
-          data: sourceList.value.data,
-          att: "productId",
-          businessType: "0",
-          fileAtt: "fileList",
-          filePathAtt: "fileUrl",
-        });
+  proxy.post("/stockWait/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    let productIds = [];
+    for (let i = 0; i < res.rows.length; i++) {
+      for (let j = 0; j < res.rows[i].stockWaitDetailsList.length; j++) {
+        let ele = res.rows[i].stockWaitDetailsList[j];
+        ele.waitQuantity = Number(ele.quantity) - Number(ele.receiptQuantity);
+        productIds.push(ele.productId);
       }
-    });
+    }
+    if (productIds && productIds.length > 0) {
+      proxy
+        .getFileData({
+          businessIdList: Array.from(new Set(productIds)),
+          getAll: true,
+        })
+        .then((res) => {
+          for (let i = 0; i < sourceList.value.data.length; i++) {
+            for (
+              let j = 0;
+              j < sourceList.value.data[i].stockWaitDetailsList.length;
+              j++
+            ) {
+              let ele = sourceList.value.data[i].stockWaitDetailsList[j];
+              for (const key in res) {
+                if (ele.productId == key && res[key]) {
+                  let list = res[key].filter((x) => x.businessType == "0");
+                  ele.fileUrl = list && list.length > 0 ? list[0].fileUrl : "";
+                  break;
+                }
+              }
+            }
+          }
+        });
+    }
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
 getDict();
 getList();
@@ -315,7 +394,8 @@ const formData = reactive({
 const formConfig = computed(() => {
   return [
     {
-      label: "待出库信息",
+      type: "title1",
+      title: "待出库信息",
     },
     {
       type: "select",
@@ -323,6 +403,7 @@ const formConfig = computed(() => {
       label: "数据来源",
       disabled: true,
       data: businessType.value,
+      itemWidth: 50,
     },
     {
       type: "input",
@@ -330,23 +411,7 @@ const formConfig = computed(() => {
       label: "单号",
       itemType: "text",
       disabled: true,
-    },
-    {
-      type: "input",
-      prop: "productName",
-      label: "物品名称",
-      itemType: "text",
-      disabled: true,
-    },
-    {
-      type: "input",
-      prop: "quantity",
-      label: "待出库数量",
-      itemType: "text",
-      disabled: true,
-    },
-    {
-      label: "本次出库",
+      itemWidth: 50,
     },
     {
       type: "select",
@@ -354,56 +419,68 @@ const formConfig = computed(() => {
       label: "仓库名称",
       required: true,
       data: warehouseList.value,
+      itemWidth: 50,
+    },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "fileList",
+      label: "上传附件",
+      itemWidth: 100,
     },
     {
-      type: "number",
-      prop: "warehousingQuantity",
-      label: "出库数量",
-      precision: 0,
-      min: 1,
-      controls: false,
+      type: "title1",
+      title: "出库明细",
+    },
+    {
+      type: "slot",
+      slotName: "detail",
+      label: "",
     },
   ];
 });
 const rules = ref({
   warehouseId: [{ required: true, message: "请选择仓库", trigger: "change" }],
-  warehousingQuantity: [
-    { required: true, message: "请输入出库数量", trigger: "blur" },
-  ],
+  quantity: [{ required: true, message: "请输入入库数量", trigger: "blur" }],
 });
 const submitForm = () => {
   submit.value.handleSubmit(() => {
-    loadingDialog.value = true;
-    if (formData.data.warehousingQuantity > Number(formData.data.quantity)) {
-      return ElMessage({
-        message: "出库数量不可大于待出库数量",
-        type: "info",
-      });
+    if (!(formData.data.fileList && formData.data.fileList.length > 0)) {
+      return proxy.msgTip("请上传附件", 2);
     }
-    proxy
-      .post("/stockWait/add", {
-        id: formData.data.id,
-        warehouseId: formData.data.warehouseId,
-        quantity: formData.data.warehousingQuantity,
-      })
-      .then(
-        () => {
-          ElMessage({
-            message: "提交成功",
-            type: "success",
-          });
-          dialogVisible.value = false;
-          getList();
-        },
-        (err) => {
-          console.log(err);
-          loadingDialog.value = false;
-        }
-      );
+    for (let i = 0; i < formData.data.stockWaitDetailsList.length; i++) {
+      const ele = formData.data.stockWaitDetailsList[i];
+      if (Number(ele.quantity) > Number(ele.waitQuantity)) {
+        return proxy.msgTip("入库数量不可大于待入库数量", 2);
+      }
+    }
+    loadingDialog.value = true;
+    proxy.post("/stockWait/add", formData.data).then(
+      () => {
+        proxy.msgTip("提交成功", 1);
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        loadingDialog.value = false;
+      }
+    );
   });
 };
 const clickOperation = (row) => {
-  formData.data = row;
+  formData.data = {
+    id: row.id,
+    businessType: row.businessType + "",
+    businessCode: row.businessCode,
+    warehouseId: "",
+    stockWaitDetailsList: row.stockWaitDetailsList.map((x) => ({
+      ...x,
+      needQuantity: x.quantity,
+      quantity: null,
+    })),
+    fileList: [],
+  };
   loadingDialog.value = false;
   dialogVisible.value = true;
 };

+ 190 - 120
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -4,17 +4,72 @@
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row @get-list="getList">
 
-        <template #pic="{item}">
-          <div style="width: 100%">
-            <img v-if="item.fileUrl" :src="item.fileUrl" class="pic" @click="openImg(item.fileUrl)" />
+        <template #expand="{item}">
+          <div style="width:100%;padding:0 50px">
+            <el-table :data="item.stockWaitDetailsList" class="bom-table" border>
+              <el-table-column label="物品图片" width="100" align="center">
+                <template #default="{ row }">
+                  <div v-if="row.fileUrl">
+                    <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productCode" label="物品编码" width="200" />
+              <el-table-column prop="productName" label="物品名称" min-width="130" />
+              <el-table-column label="尺寸 (cm)" width="140">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="需入库数量" prop="quantity" width="100" />
+              <el-table-column label="待入库数量" prop="waitQuantity" width="100" />
+              <el-table-column label="已入库数量" prop="receiptQuantity" width="100" />
+            </el-table>
           </div>
         </template>
-
       </byTable>
     </div>
 
-    <el-dialog title="入库" v-if="dialogVisible" v-model="dialogVisible" width="1200" v-loading="loadingDialog">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+    <el-dialog title="入库" v-if="dialogVisible" v-model="dialogVisible" width="1200">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+        <template #detail>
+          <div style="width:100%">
+            <div style="width:100%;padding:0 15px">
+              <el-table :data="formData.data.stockWaitDetailsList">
+                <el-table-column label="物品图片" width="80">
+                  <template #default="{ row }">
+                    <div v-if="row.fileUrl">
+                      <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="productCode" label="物品编码" width="160" />
+                <el-table-column prop="productName" label="物品名称" min-width="130" />
+                <el-table-column label="尺寸 (cm)" width="140">
+                  <template #default="{ row, $index }">
+                    <div style="width: 100%">
+                      {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column label="需入库数量" prop="needQuantity" width="100" />
+                <el-table-column label="待入库数量" prop="waitQuantity" width="100" />
+                <el-table-column label="已入库数量" prop="receiptQuantity" width="100" />
+                <el-table-column prop="quantity" label="入库数量" width="130">
+                  <template #default="{ row, $index }">
+                    <el-form-item :prop="'stockWaitDetailsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
+                                  class="margin-b-0">
+                      <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
+                                       :controls="false" :min="0" />
+                    </el-form-item>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </div>
+        </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="default">取 消</el-button>
@@ -136,10 +191,18 @@ const selectConfig = computed(() => {
 const config = computed(() => {
   return [
     {
+      type: "expand",
+      attrs: {
+        slot: "expand",
+        width: 50,
+        align: "center",
+      },
+    },
+    {
       attrs: {
         label: "数据来源",
         prop: "businessType",
-        width: 120,
+        // width: 120,
       },
       render(type) {
         return proxy.dictValueLabel(type, businessType.value);
@@ -149,33 +212,33 @@ const config = computed(() => {
       attrs: {
         label: "单号",
         prop: "businessCode",
-        width: 160,
-      },
-    },
-    {
-      attrs: {
-        label: "图片",
-        slot: "pic",
-        align: "center",
-        width: 80,
-      },
-    },
-    {
-      attrs: {
-        label: "物品编码",
-        prop: "productCustomCode",
-        width: 140,
-      },
-    },
-    {
-      attrs: {
-        label: "物品名称",
-        prop: "productName",
-        "min-width": 200,
+        // width: 160,
       },
     },
     // {
     //   attrs: {
+    //     label: "图片",
+    //     slot: "pic",
+    //     align: "center",
+    //     width: 80,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "物品编码",
+    //     prop: "productCustomCode",
+    //     width: 140,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "物品名称",
+    //     prop: "productName",
+    //     "min-width": 200,
+    //   },
+    // },
+    // {
+    //   attrs: {
     //     label: "规格型号",
     //     prop: "productSpec",
     //     width: 140,
@@ -191,18 +254,18 @@ const config = computed(() => {
     //     return proxy.dictKeyValue(unit, materialUnitData.value);
     //   },
     // },
-    {
-      attrs: {
-        label: "待入库数量",
-        prop: "quantity",
-        width: 120,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "待入库数量",
+    //     prop: "quantity",
+    //     width: 120,
+    //   },
+    // },
     {
       attrs: {
         label: "入库状态",
         prop: "status",
-        width: 140,
+        // width: 140,
       },
       render(type) {
         return proxy.dictValueLabel(type, status.value);
@@ -249,31 +312,46 @@ const getDict = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy
-    .post("/stockWaitDetails/page", sourceList.value.pagination)
-    .then((res) => {
-      sourceList.value.data = res.rows.map((x) => ({
-        ...x,
-        quantity: (x.quantity - x.receiptQuantity).toFixed(4),
-      }));
-      sourceList.value.pagination.total = res.total;
-      setTimeout(() => {
-        loading.value = false;
-      }, 200);
-
-      const productIdList = res.rows.map((x) => x.productId);
-      // 请求文件数据并回显
-      if (productIdList.length > 0) {
-        proxy.getFileData({
-          businessIdList: productIdList,
-          data: sourceList.value.data,
-          att: "productId",
-          businessType: "0",
-          fileAtt: "fileList",
-          filePathAtt: "fileUrl",
-        });
+  proxy.post("/stockWait/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    let productIds = [];
+    for (let i = 0; i < res.rows.length; i++) {
+      for (let j = 0; j < res.rows[i].stockWaitDetailsList.length; j++) {
+        let ele = res.rows[i].stockWaitDetailsList[j];
+        ele.waitQuantity = Number(ele.quantity) - Number(ele.receiptQuantity);
+        productIds.push(ele.productId);
       }
-    });
+    }
+    if (productIds && productIds.length > 0) {
+      proxy
+        .getFileData({
+          businessIdList: Array.from(new Set(productIds)),
+          getAll: true,
+        })
+        .then((res) => {
+          for (let i = 0; i < sourceList.value.data.length; i++) {
+            for (
+              let j = 0;
+              j < sourceList.value.data[i].stockWaitDetailsList.length;
+              j++
+            ) {
+              let ele = sourceList.value.data[i].stockWaitDetailsList[j];
+              for (const key in res) {
+                if (ele.productId == key && res[key]) {
+                  let list = res[key].filter((x) => x.businessType == "0");
+                  ele.fileUrl = list && list.length > 0 ? list[0].fileUrl : "";
+                  break;
+                }
+              }
+            }
+          }
+        });
+    }
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
 };
 getDict();
 getList();
@@ -312,27 +390,6 @@ const formConfig = computed(() => {
       itemWidth: 50,
     },
     {
-      type: "input",
-      prop: "productName",
-      label: "物品名称",
-      itemType: "text",
-      disabled: true,
-      itemWidth: 50,
-    },
-    {
-      type: "input",
-      prop: "quantity",
-      label: "待入库数量",
-      itemType: "text",
-      disabled: true,
-      itemWidth: 50,
-    },
-
-    {
-      type: "title1",
-      title: "本次入库",
-    },
-    {
       type: "select",
       prop: "warehouseId",
       label: "仓库名称",
@@ -341,55 +398,65 @@ const formConfig = computed(() => {
       itemWidth: 50,
     },
     {
-      type: "number",
-      prop: "warehousingQuantity",
-      label: "入库数量",
-      precision: 0,
-      min: 1,
-      controls: false,
-      itemWidth: 50,
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "fileList",
+      label: "上传附件",
+      itemWidth: 100,
+    },
+    {
+      type: "title1",
+      title: "入库明细",
+    },
+    {
+      type: "slot",
+      slotName: "detail",
+      label: "",
     },
   ];
 });
 const rules = ref({
   warehouseId: [{ required: true, message: "请选择仓库", trigger: "change" }],
-  warehousingQuantity: [
-    { required: true, message: "请输入入库数量", trigger: "blur" },
-  ],
+  quantity: [{ required: true, message: "请输入入库数量", trigger: "blur" }],
 });
 const submitForm = () => {
   submit.value.handleSubmit(() => {
+    if (!(formData.data.fileList && formData.data.fileList.length > 0)) {
+      return proxy.msgTip("请上传附件", 2);
+    }
+    for (let i = 0; i < formData.data.stockWaitDetailsList.length; i++) {
+      const ele = formData.data.stockWaitDetailsList[i];
+      if (Number(ele.quantity) > Number(ele.waitQuantity)) {
+        return proxy.msgTip("入库数量不可大于待入库数量", 2);
+      }
+    }
     loadingDialog.value = true;
-    // if (formData.data.warehousingQuantity > Number(formData.data.quantity)) {
-    //   return ElMessage({
-    //     message: "入库数量不可大于待入库数量",
-    //     type: "info",
-    //   });
-    // }
-    proxy
-      .post("/stockWait/add", {
-        id: formData.data.id,
-        warehouseId: formData.data.warehouseId,
-        quantity: formData.data.warehousingQuantity,
-      })
-      .then(
-        () => {
-          ElMessage({
-            message: "提交成功",
-            type: "success",
-          });
-          dialogVisible.value = false;
-          getList();
-        },
-        (err) => {
-          console.log(err);
-          loadingDialog.value = false;
-        }
-      );
+    proxy.post("/stockWait/add", formData.data).then(
+      () => {
+        proxy.msgTip("提交成功", 1);
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        loadingDialog.value = false;
+      }
+    );
   });
 };
 const clickOperation = (row) => {
-  formData.data = row;
+  formData.data = {
+    id: row.id,
+    businessType: row.businessType + "",
+    businessCode: row.businessCode,
+    warehouseId: "",
+    stockWaitDetailsList: row.stockWaitDetailsList.map((x) => ({
+      ...x,
+      needQuantity: x.quantity,
+      quantity: null,
+    })),
+    fileList: [],
+  };
   loadingDialog.value = false;
   dialogVisible.value = true;
 };
@@ -402,4 +469,7 @@ const clickOperation = (row) => {
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }
+:deep(.bom-table .el-table__body-wrapper .el-table__body .el-table__row) {
+  background: #f4f4f5 !important;
+}
 </style>

+ 1 - 1
src/views/salesMange/afterSales/index.vue

@@ -264,7 +264,7 @@ const formConfig = computed(() => {
       type: "number",
       prop: "quantity",
       label: "售后数量",
-      precision: 2,
+      precision: 0,
       min: 0,
       controls: false,
       itemWidth: 50,

+ 15 - 0
src/views/systemTenant/tenant/deptTenant/index.vue

@@ -208,6 +208,21 @@ const formConfig = computed(() => {
       label: "聚水潭分销商",
     },
     {
+      type: "select",
+      prop: "sss",
+      label: "性质",
+      data: [
+        {
+          label: "销售",
+          value: "1",
+        },
+        {
+          label: "生产",
+          value: "2",
+        },
+      ],
+    },
+    {
       type: "slot",
       prop: "orderNum",
       slotName: "orderNum",